user8026931
user8026931

Reputation:

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?

Figure

Upvotes: 0

Views: 2021

Answers (1)

Marko Juvančič
Marko Juvančič

Reputation: 5890

Try this:

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

Upvotes: 2

Related Questions