We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

GridBoundColumnsEditor at runtime?

Hi, Im not sure if this is possible, but is there a way to use a UITypeEditor at runtime, say in a dialog? Ive found lots of queries about this kind fo thing on the bwe, but few answers. It would be extremely conventient to be able to use the GridBoundColumnsEditor directly at runtime.

4 Replies

AD Administrator Syncfusion Team December 11, 2003 12:29 AM UTC

It is possible to display a collection editor within a dialog. I attached a sample that displays the GridBoundColumns in a form in a CollectionEditor. Stefan GridBoundColumnCollectionEditor_1599.zip


AD Administrator Syncfusion Team December 11, 2003 12:00 PM UTC

Thanks for the amazingly helpfull sample.


AD Administrator Syncfusion Team December 11, 2003 12:05 PM UTC

One last question: I found an earlier post about how to present a dialog for selecting and re-ordering columns such that they retain their column widths. The suggestion was to use the Grid.Model.Cols.MoveRange method. Would you recommend selecting and re-ordering the visible columns using the GridBoundColumns collection, or by the Grid.Model.Cols method? Is there a way to simply get and set a collection of visible columns?


AD Administrator Syncfusion Team December 11, 2003 01:00 PM UTC

The Grid.Model.Cols.MoveRange is how the grid handles moving columns when the UI allows the user to select columns and then drag them by the header to a new locations. The code fires certain events during the process to allow events listeners to handle things. (One such listener is the Binder that uses the event to re-arrange the GridBoundColumns collection). If you directly minipulate the GridboundColumns collection, you avoid the Model events. As far as whether you should use one approach or the other, it probably only matters if you need the model events to be fired for some reason when you re-arrange the columns.

Loader.
Live Chat Icon For mobile
Up arrow icon