用DevExpress控件的gridControl1怎么得到gridView1一行的索引
展开全部
你好
这样非常见的问题,可以去DEV官网查下。以前使用过。
搜索这个主题”How to determine the index of the currently selected row“
if (view.FocusedRowData == null)
textbox.Text = "No Rows Selected";
else
if (grid.GetRowVisibleIndexByHandle(view.FocusedRowData.RowHandle.Value) == 0)
textbox.Text = "First Row!";
else
if (grid.GetRowVisibleIndexByHandle(view.FocusedRowData.RowHandle.Value) == grid.VisibleRowCount - 1)
textbox.Text = "Last Row!";
else
textbox.Text = "Row Index: " +
grid.GetRowVisibleIndexByHandle(view.FocusedRowData.RowHandle.Value).ToString();
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询