简体   繁体   中英

How to get cell index in DevExpress Gridview?

I have 6 columns on gridview (shown as figure). How to get cell index? For example, when I handle double click Durum(Status) column or Detay(Detail) column on gridview, return index numbers. Actually I want to do that when I double click different cell of the row, happen different things. For example I double click the status cell of the row, change the status or I double click the detail cell of the same row, open new form. How can I do this?

数字

Try this:

private void gridView1_DoubleClick(object sender, EventArgs e) {
   var gv = sender as GridView;
   var rowIndex = gv.FocusedRowHandle;
   var columnIndex = gv.FocusedColumn.VisibleIndex;
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM