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

GridBoundColumnsEditor at runtime?

Thread ID:

Created:

Updated:

Platform:

Replies:

9220 Dec 10,2003 04:11 PM Dec 11,2003 08:00 AM Windows Forms 4
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On December 10, 2003 04:11 PM

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 10, 2003 07:29 PM

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 07:00 AM

Thanks for the amazingly helpfull sample.

Administrator [Syncfusion]
Replied On December 11, 2003 07:05 AM

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 08:00 AM

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.

CONFIRMATION

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.

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

;