WinForm程序中listview实现 winformlistview 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 ListView基本使用参考了http://blog.csdn.net/chen_zw/article/details/7910324?reload这个文章 http://www.cnblogs.com/ngnetboy/archive/2012/03/11/2390137.html绑定一个imageList控件。 这个bs版的吗?建议还是使用WPF的DataGrid,通过单元格模板,很容易都实现了。 考虑用Dev的TreeList控件。或者全部自己做,这个就有点烦了 两个问题比较难实现,第一列中的两行文字,并且第二行文字的字体大小和颜色和第一行有区别;第二是最后一列中内容是类似LinkLabel控件的功能 是windform客户端嗯,这个估计不可以。借助第三方吧最好。 listview控件实现修改功能 private void listView1_AfterLabelEdit(object sender,LabelEditEventArgs e) { WidgetConnection = new OleDbConnection(ConnectString);//初始化一个数据库连接 if(WidgetConnection.State == ConnectionState.Closed)//当数据库连接处于关闭状态时 { WidgetConnection.Open();//打开数据库连接 } if(e.Label != null && e.Label != "")//当选定项的文本内容存在且不为空时 {//CodeGo.net/ string RefreshString = "update tb_WidgetApply set 产品名称='" //定义更新数据库字符串 + e.Label + "' where 产品编号=" + (e.Item+1).ToString(); OleDbCommand WidgetCommand = new OleDbCommand(//声明一个执行SQL语句的对象 RefreshString,WidgetConnection); WidgetCommand.ExecuteNonQuery();//执行SQL语句 WidgetConnection.Close();//关闭数据库连接 MessageBox.Show("数据修改成功!","提示信息",//弹出信息提示 MessageBoxButtons.OK,MessageBoxIcon.Asterisk); } } listview加载数据后,在后台重新给列添加链接 datagridview 可以实现上述功能. c#串口通信假死,求助 使用AcceptAsync方法异步接收Socket如何捕获错误? ASP.NET ,PHP等能不能获得客户端的网卡地址? for循环sokcet.connect()问题 [高手进来]TreeView怎么样像其他控件那样的进行重新改造阿? 请高手帮忙怎么得到EXCEL中的表名添加到下拉列表中 请问:哪里有visual studio.net 2003英文版下载呀?送20分 如何得到线程id? 怎样使正则表达式的匹配结果不重复? 如何在ActiveReport中自定义数据连结? 动态控件代码响应事件 Chart缩放问题!
http://blog.csdn.net/chen_zw/article/details/7910324?reload
这个文章
第二是最后一列中内容是类似LinkLabel控件的功能
嗯,这个估计不可以。借助第三方吧最好。
private void listView1_AfterLabelEdit(object sender,LabelEditEventArgs e)
{
WidgetConnection = new OleDbConnection(ConnectString);//初始化一个数据库连接
if(WidgetConnection.State == ConnectionState.Closed)//当数据库连接处于关闭状态时
{
WidgetConnection.Open();//打开数据库连接
}
if(e.Label != null && e.Label != "")//当选定项的文本内容存在且不为空时
{//CodeGo.net/
string RefreshString = "update tb_WidgetApply set 产品名称='" //定义更新数据库字符串
+ e.Label + "' where 产品编号=" +
(e.Item+1).ToString();
OleDbCommand WidgetCommand = new OleDbCommand(//声明一个执行SQL语句的对象
RefreshString,WidgetConnection);
WidgetCommand.ExecuteNonQuery();//执行SQL语句
WidgetConnection.Close();//关闭数据库连接
MessageBox.Show("数据修改成功!","提示信息",//弹出信息提示
MessageBoxButtons.OK,MessageBoxIcon.Asterisk);
}
}