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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridBoundColumnsEditor at runtime?

Thread ID:





9220 Dec 10,2003 09:11 PM UTC Dec 11,2003 01:00 PM UTC WinForms 4
Tags: GridControl
Administrator [Syncfusion]
Asked On December 10, 2003 09:11 PM UTC

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.

Administrator [Syncfusion]
Replied On 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

Administrator [Syncfusion]
Replied On December 11, 2003 12:00 PM UTC

Thanks for the amazingly helpfull sample.

Administrator [Syncfusion]
Replied On 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?

Administrator [Syncfusion]
Replied On 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.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon