GDBG ''column sorted'' event ?
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
Thanks for any assistance !
-Rob
SIGN IN To post a reply.
8 Replies
HA
haneefm
Syncfusion Team
June 18, 2007 03:12 PM UTC
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
Below is a forum thread that discuss with the similar issue.
http://www.syncfusion.com/support/Forums/message.aspx?&MessageID=53904
Best regards,
Haneef
RY
Rob Yang
June 18, 2007 03:29 PM UTC
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
>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
RY
Rob Yang
June 26, 2007 05:27 PM UTC
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
http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=137
Thanks for any assistance !
-Rob
HA
haneefm
Syncfusion Team
June 26, 2007 07:51 PM UTC
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
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
RY
Rob Yang
June 26, 2007 08:36 PM UTC
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
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
RY
Rob Yang
June 26, 2007 09:17 PM UTC
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
-Rob
HA
haneefm
Syncfusion Team
June 26, 2007 09:28 PM UTC
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
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
RY
Rob Yang
June 27, 2007 05:14 AM UTC
Excellent, thanks Haneef !
-Rob
-Rob
SIGN IN To post a reply.
- 8 Replies
- 2 Participants
-
RY Rob Yang
- Jun 17, 2007 03:19 PM UTC
- Jun 27, 2007 05:14 AM UTC