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.

GDBG ''column sorted'' event ?

Thread ID:

Created:

Updated:

Platform:

Replies:

62518 Jun 17,2007 11:19 AM Jun 27,2007 01:14 AM Windows Forms 8
loading
Tags: GridControl
Rob Yang
Asked On June 17, 2007 11:19 AM

Hi, we have a GridDataBoundGrid whose contents can be sorted when a column header is clicked. Is there an event we could hook which would tell us when the user has changed the sort order, so that we could re-synch other views of this data ?

Thanks for any assistance !
-Rob

haneefm [Syncfusion]
Replied On June 18, 2007 11:12 AM

Hi Rob,

Below is a forum thread that discuss with the similar issue.
http://www.syncfusion.com/support/Forums/message.aspx?&MessageID=53904

Best regards,
Haneef

Rob Yang
Replied On June 18, 2007 11:29 AM

Thanks Haneef !
-Rob

>Hi Rob,

Below is a forum thread that discuss with the similar issue.
http://www.syncfusion.com/support/Forums/message.aspx?&MessageID=53904

Best regards,
Haneef

Rob Yang
Replied On June 26, 2007 01:27 PM

Is it possible to make this work with the dynamic splitter panes in the GridRecordNavigationControl ? I was perusing this KB article :

http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=137

Thanks for any assistance !
-Rob

haneefm [Syncfusion]
Replied On June 26, 2007 03:51 PM

Hi Rob,

Below is a sample that implments the GridRecordNavigation with dynamic spilitter bar in a grid. You can set the splitter bar position by using the VSplitPos/HSplitPos property. Please try the attached sample and let me know if this helps.

gridRecordNavigationControl1.VSplitPos = 50;
gridRecordNavigationControl1.HSplitPos = 50;

RecordNavDataBoundGrid.zip

Best regards,
Haneef

Rob Yang
Replied On June 26, 2007 04:36 PM

Haneef - thanks, but that's not what I was looking for. The KB article above describes having to handle the navigation control's PaneCreated and PaneClosing events, because in each pane is a new instance of the grid.

What we are seeing is this - when we derive the grid so that we can hook the sort changed/changing events, the type of the new instances are not our derived class, but GridDataBoundGrid. Thus we cannot hook the sort change events for those splitter panes.

I've attached a modified sample so you can see what I mean.

-Rob


GDBGSortChangeEvent.zip

Rob Yang
Replied On June 26, 2007 05:17 PM

Actually, never mind - we were able to hook the GridDataBoundGrid.Binder.BindingListChanged event and just look for ListChangedType.Reset ; when this happens we just use the data view's Sort property to resynch our other view.

-Rob

haneefm [Syncfusion]
Replied On June 26, 2007 05:28 PM

Hi Rob,

You would have to derive the GridDataBoundGrid and override the CreateNewControl method to initialize new grid(MyDataBoundGrid) based on current grid settings.The overriding CreateNewControl is required if you want your derived grid to be contained in a TabBarSplitterControl or a GridRecordNavigationControl. Below is a code snippet.

public override Control CreateNewControl(Control parent, int row, int column)
{
MyDataBoundGrid grid = new MyDataBoundGrid((GridDataBoundGridModel)this.Model);
this.WireNewControl(grid);
return grid;
}

Sample : GDBGSortChangeEvent.zip

Best regards,
Haneef

Rob Yang
Replied On June 27, 2007 01:14 AM

Excellent, thanks Haneef !

-Rob

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.

;