Posted 24 March 2021, 6:10 am EST
Hi I didnt find how get the selected column when Im in “Row mode”.
I’m able to know witch row I selected but I need to know also
witch field (column) I selected in the row, also if I do not edit it.
Thanx
Forums Home / ComponentOne / WPF Edition
Posted by: kisar on 24 March 2021, 6:10 am EST
Posted 24 March 2021, 6:10 am EST
Hi I didnt find how get the selected column when Im in “Row mode”.
I’m able to know witch row I selected but I need to know also
witch field (column) I selected in the row, also if I do not edit it.
Thanx
Posted 24 March 2021, 6:19 am EST
sorry I meant in “cell mode”
Posted 24 March 2021, 8:04 am EST
Hi Kisar,
I am not sure which control you are using. Since, ListView doesn’t have a cell selection mode so I am assuming that you are using either C1FlexGrid or C1DataGrid.
So, if you are using FlexGrid then you can use its Selection’s Column property as follows:
int selectedColumn = flexGrid.Selection.Column;
Similarly, in DataGrid you can use its Selection’s SelectedColumns property as follows:
int selectedColumn = dataGrid.Selection.SelectedColumns[0].Index;
Please let me know if I interpreted you incorrectly.
Best Regards,
Kartik
Posted 24 March 2021, 10:27 am EST
sorry it was FlexGrid,
thank you