Posted 23 March 2021, 9:10 pm 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 23 March 2021, 9:10 pm EST
Posted 23 March 2021, 9:10 pm 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 23 March 2021, 9:19 pm EST
sorry I meant in “cell mode”
Posted 23 March 2021, 11:04 pm 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, 1:27 am EST
sorry it was FlexGrid,
thank you