Question is derived from the following ticket .
https://www.devexpress.com/Support/Center/Question/Details/T156269
My question is that , how i can get value from column[0] always, when double clicked on any column .
How i can do perform.
Get value from particular column on double click on another column
Answers approved by DevExpress Support
Hello,
You can pass a necessary column to the GetRowCellValue method instead of getting it from the HitInfo instance.
Here is a code snippet:
C#private static void DoRowDoubleClick(GridView view, Point pt) {
GridHitInfo info = view.CalcHitInfo(pt);
if(info.InRow || info.InRowCell) {
string colCaption = info.Column == null ? "N/A" : info.Column.GetCaption();
GridColumn col = gridView1.Columns[0];
object val = view.GetRowCellValue(info.RowHandle, col);
if(val != null)
MessageBox.Show(string.Format("DoubleClick on row: {0}, column: {1}, value: {2}", info.RowHandle, colCaption, val));
}
}
I hope this helps.