Private Sub GridView1_CustomDrawRowIndicator(sender As Object, e As RowIndicatorCustomDrawEventArgs) Handles GridView1.CustomDrawRowIndicator '行号 If e.Info.IsRowIndicator And e.RowHandle >= 0 Then e.Info.DisplayText = e.RowHandle + 1 End If End Sub
症状如图: 上图中,行号列与checkbox 列融合了.解决方法是在datagrid 的 onLoadSuccess 事件中加入如下代码: var opts = $(this).datagrid('options'); if(opts.rownumbers){ var dgPanel = $(this).datagrid('getPanel'); var tdRownumber = dgPanel.find('.datagrid-header-rownumber').parent(); var