I'd like to create a custom column chooser with a couple check boxes at the top. Is there a way to be able to do this? It seems to me that there should be a template that you can just add extra stuff to if you like.
I've been going through other posts on similar topics but they're all so old and I don't know what the current version can do.
What are your checkboxes doing? Sounds like you want one to do a "select all". What's the other one?
If you just want to check or uncheck all of the columns, there are easier ways than creating your own custom control. You could probably modify the dialog the grid shows with a little coding.
Anyway, if you want to loop through the rows in the ColumnChooser, you can do that. It helps to know that the list you are seeing inside the ColumnChooser control is actually an UltraGrid. So the only really tricky part is getting a reference to that grid and then you can loop through the rows or modify the grid however you want.
To get the grid, you can do something like this:
var columnChooserGrid = (UltraGrid)myColumnChooser.Controls.Find("displayGrid", true).First();
Thanks for that. I was actually able to add what I needed by putting everything in a user control and docking it to the top of the ColumnChooser form. However, the one issue I have now is accessing the rows in the ColumnChooser grid itself. One of my checkboxes is for Select All. How can I access those rows? I just can't find any properties for it, but it's possible with multi-select so it can be done.
Hello Sean,
Modifying a control can be done by utilizing the CreationFilter which all our controls have exposed. It allows you to add, replace or modify existing elements.
The issue here, is that i don't really see any space for these checkboxes you want to add. The control already have a logic to place all its children in the row container, as well as resizing implemented for them. Creating space for these checkboxes will interfere with both of the above implementations, so its likely that they may not work after that.
What i would suggest instead, is to create your own form, and add checkboxes or any other controls with the ColumnChooser in it. There is a sample in ours samples browser showing how to create a custom column chooser form and embed the column chooser control inside it.
Should you have any other questions, please let me know.
Sincerely,Tihomir TonevAssociate Software DeveloperInfragistics