I have a WinGrid with cardview and userowlayout set to true.
Is it possible to view the columnchooser button to appear above the row header region?
Its appears fine when run the grid not on cardview.
Thanks
Thank you Mike! That was exactly what I meant.
Your sample helped me a lot.
I've also submitted a feature request here.
Hi Rob,
Hm. When you put it that way, I'm wondering why we don't have a property to do this built-in. Please Submit a Feature Request through our web site for this and maybe we can add it in the future.
In the mean time, I whipped up a quick CreationFilter sample for you. It seems pretty straightforward. The button element already knows how to get a reference to the grid, so the only tricky part is positioning it correctly. I'm using the first card's label element as a reference, so there's a change that if that element doesn't exist (because there are no cards to display or because it's scrolled out of view or something) that this code will fail to show the button or show it in the wrong place. But I hard-coded some defaults that should be okay, and that's really an edge case, anyway.
Hi Mike,
A button outside of the grid would be a possibility and we have an option in the context menu as well.
However, users are used to having that button there, so I'd like it to be in the same spot to make it more intuitive for them.
So the top left corner, just like when the grid is not in cardview. I've attached a screenshot.
Can I use that CreationFilter to put the same column chooser button on there?
According to my previous response, it looks like the grid doesn't have any place to put the ColumnChooser button when the grid is in CardView mode. The button usually appears at the top of the RowSelectors, but in CardView, there are no RowSelectors.
So the easiest thing to do would be to add a button to your form (outside the grid) that shows the ColumnChooser.
Another option would be to use a CreationFilter to place a ColumnChooser button into the grid yourself. The obvious question would then be - where would you put it?
It is possible to open the column chooser from design view by calling the "ShowColumnChooser" function on the ultragrid,
and it works.
However, I can't find the column chooser button anymore, even though it is enabled and shows up if CardView is turned off.
"this.DisplayLayout.ColumnChooserEnabled".
What do you suggest I can do to make this button visible in CardView as well?