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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GGC Columns_Changed event

Thread ID:

Created:

Updated:

Platform:

Replies:

31686 Jul 12,2005 06:08 PM UTC Jul 13,2005 05:30 PM UTC WinForms 5
loading
Tags: GridControl
Ivan
Asked On July 12, 2005 06:08 PM UTC

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 07:37 PM UTC

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 08:07 PM UTC

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 08:22 PM UTC

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

Administrator [Syncfusion]
Replied On July 13, 2005 12:11 AM UTC

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 05:30 PM UTC

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.

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

;