随笔分类 -  DataGridView

摘要:废话不说,直接上例子:前台代码: 注意:1、需要设置AllowSorting=true2、需要设置每一列的SortExpression,设置的值为绑定数数据源中的一列,排序时,根据该设置值为排序依据3、增加onsorting事件后台代码:1、本例子使用到... 阅读全文
posted @ 2015-07-15 15:16 Mo 阅读(874) 评论(0) 推荐(0)
摘要:DataGridViewRow.DataBoundItem获取用于填充行的数据绑定对象。Dim drv as DataRowView = DataGridView.CurrentRow.DataBoundItem再通过DataRowView的的Row属性获取绑定于该DataGridView的DataTable的DataRow 阅读全文
posted @ 2009-07-15 16:38 Mo 阅读(1790) 评论(0) 推荐(0)
摘要:在列标题处单击和在内容处单击弹出不同菜单 Private Sub DataGridView1_CellMouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles DataGridView.CellMouseDown If e.But... 阅读全文
posted @ 2009-04-30 17:46 Mo 阅读(1102) 评论(0) 推荐(0)