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.

GGC Columns_Changed event

Thread ID:

Created:

Updated:

Platform:

Replies:

31686 Jul 12,2005 02:08 PM Jul 13,2005 01:30 PM Windows Forms 5
loading
Tags: GridControl
Ivan
Asked On July 12, 2005 02:08 PM

Hi, I''m using the GGC. The column descriptors and the datasource are populated dynamically and could be changed at run-time. My goal is to catch an event when users reorder columns by Drag&Drop. I''ve tried the approached, described in: http://www.syncfusion.com/Support/user/uploads/GGC_MoveCOlumns_8e767f4c.zip But the Columns_Changed fires only once. After I change the Model and/or datasource it will not fire. I also tried to subcribe to this event after I change the model and datasource - still the same. Any suggestions? Thank you.

Ivan
Replied On July 12, 2005 03:37 PM

It seems that I''ve found the source of the problem: After I populate the columns, I set the visibility of the columns in the following way: gridGroupingControl1.TableDescriptor.VisibleColumns.Clear(); for(int i=0;....) { if(some_condition) gridGroupingControl1.VisibleColumns.Add(proper_name); } After that Columns_Changed still fires, but only for ItemPropertyChanged. Is there any other proper way of setting columns visibility dynamically? Thank you

Administrator [Syncfusion]
Replied On July 12, 2005 04:07 PM

I tried to see a problem in the sample. I added a button that creates a new datasource for the the grid. In this sample, the events still are raised for me. http://www.syncfusion.com/Support/user/uploads/GGC_MoveCOlumns_b223e272.zip What are you doing differently to get the events unhooked?

Ivan
Replied On July 12, 2005 04:22 PM

I clear and repopulate Visible columns collection: gridGroupingControl1.TableDescriptor.VisibleColumns.Clear(); gridGroupingControl1.TableDescriptor.VisibleColumns.Add();

Administrator [Syncfusion]
Replied On July 12, 2005 08:11 PM

Instead of the this.gridGroupingControl1.TableDescriptor.Columns.Changed, try using this.gridGroupingControl1.TableDescriptor.VisibleColumns.Changed event. http://www.syncfusion.com/Support/user/uploads/GGC_MoveCOlumns_e10df834.zip

Ivan
Replied On July 13, 2005 01:30 PM

Thank you! This works great

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.

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.

;