I have Row Selectors to select a row. However I explicitly turned off cell selection(no editing of cell allowed). But sometimes I feel that we should be able to select a row by clicking on a cell. It think that it is normal use-case, I don't know whether it is possible in UltraGrid.
My requirement is as follows: Can I select a row by clicking on a cell(where cell editing is not allowed) and How do I catch that RowSelector event?
And also one more thing is that Can I have Field chooser button when RowSelectors turned off(or no row selectors). Which means I have UltraGrid where there is no meaning of selecting a row (used to see the results only). But I want to have FiledChooser. But I found FieldChoosers displays only when RowSelectors turned on.
Thanks in advance,
Sanjeev.
Hi Sanjeev,
If you turn off the RowSelectors, then there is no place in the grid for the ColumnChooser button to appear. But you could show the column chooser in some other way - like with a button on the form or from a context menu.
To show the ColumnChooser in code, just call the ShowColumnChooser method on the grid.
Thanks Mike for the quick reply. I have also thought of this solution but I have lot of grids in my form.
Is it possible to place a button on the dockable window(where it is having the given UltraGrid) so that atleast the columnchooser will be available just ahead of UltraGrid.
Thanks,
I'm not sure what you mean by "the dockable window". You mean an UltraDockManager pane? You cannot place two controls in a single pane. So you would have to place the grid and the button inside a panel or a UserControl and then put that in the pane.
Another option would be to use a toolbar button. When the user clicks this button, you check the form's ActiveControl and if it's a grid, you show the ColumnChooser for that grid. That way you only have one button for all the grids on the form. You might even want to handle the Enter and Leave events of the grid(s) and enabled/disable the button accordingly.
A third option would be to place a button inside the grid using a CreationFilter. But I don't know where you would put it.