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.

Syncing Hierarchial GDBG with MS DataGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

43790 May 3,2006 10:29 AM May 9,2006 09:27 AM Windows Forms 6
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On May 3, 2006 10:29 AM

Pls find attached code sample. In the code example you will see that there are three grids laid out, 2 of them are MS Datagrid and the other is Hierarchial GDBG. What i want is when user scrolls in HGDBG, i want the corresponding child rows to get reflected in MS datagrid. This works in case of MS Grid where any position change in one grid reflects in another grid but not happening in HGDBG. Regards Yogi

gridtree.zip

Administrator [Syncfusion]
Replied On May 3, 2006 03:15 PM

Would appreciate if anyone from syncfusion can look into this problem. Tks in advance.

Administrator [Syncfusion]
Replied On May 4, 2006 12:36 AM

Hi Yohi, You need to add this line in Form''s load event.Here is a code snippet. gridDataBoundGrid1.Binder.SetDataBinding(dataset11 , "ParentTable"); Here is a modified sample. http://www.syncfusion.com/Support/user/uploads/gridtree_619e446a.zip Please let me know if this helps. Best Regards, Haneef

Administrator [Syncfusion]
Replied On May 4, 2006 10:49 AM

Thanks Haneef. The changes you made works fine for the parent row. So if i scroll to next parent row i see a row pointer change in MS Data Grid. But what i want is the same behavior for child row. So for eg. in the code sample attached previously, if u scroll to child row then i see no change in row pointer behavior in MS Grid. For eg. Lets say there are two grid control. Hierarchy GDBG displays both parent and child rows in tree fashion where the other grid displays only child rows. So when user expands the parent node and scrolls to child row, i c the row getting filtered out in the other grid for that particular parent row, but what is not happening is when user scrolls, the curent row position pointer is not changed in the other grid. So when i query on currencymanager for current position on that other MS grid i get value 0. Let me know if u need more explanation. Tks once again >Hi Yohi, > >You need to add this line in Form''s load event.Here is a code snippet. > >gridDataBoundGrid1.Binder.SetDataBinding(dataset11 , "ParentTable"); > >Here is a modified sample. >http://www.syncfusion.com/Support/user/uploads/gridtree_619e446a.zip > >Please let me know if this helps. >Best Regards, >Haneef

Administrator [Syncfusion]
Replied On May 9, 2006 08:54 AM

Hi Yogi, My apologies for the delayed response. If you want changing the position in the childtable of a DataboundGrid to automayically affect a position change in a MS DataGrid, then the the datagrid and the DataboundGrid must be using the same datasource. The childtable of a hierarchical DataboundGrid is only know when the node is expanded. So, one thing you could try is to handling the RowsExpended and RowsCollapsed events in the DataboundGrid and set this dynamic childtable to be the datagrid''s datasource at that point. Attached is his form1.cs file with this change. If you expand the DataboundGrid and move teh current position in the DataboundGrid, the top right datagrid position will change too. Depending upon the exact behavior you want, you may have to explicitly handle position changed events in one or both type of grids, and then manually set the position in the other grids. Here is a form.cs file http://www.syncfusion.com/Support/user/uploads/Form1_ba2ae191.cs Please let me know if this helps. Thanks for choosing Syncfusion Products. Best Regards, Haneef

Administrator [Syncfusion]
Replied On May 9, 2006 09:24 AM

Haneef, I can''t download this file.. looks to me a security issue..can u zip it and upload it back again.. Tks Regards Yogi >Hi Yogi, > >My apologies for the delayed response. > >If you want changing the position in the childtable of a DataboundGrid to automayically affect a position change in a MS DataGrid, then the the datagrid and the DataboundGrid must be using the same datasource. The childtable of a hierarchical DataboundGrid is only know when the node is expanded. So, one thing you could try is to handling the RowsExpended and RowsCollapsed events in the DataboundGrid and set this dynamic childtable to be the datagrid''s datasource at that point. Attached is his form1.cs file with this change. If you expand the DataboundGrid and move teh current position in the DataboundGrid, the top right datagrid position will change too. > >Depending upon the exact behavior you want, you may have to explicitly handle position changed events in one or both type of grids, and then manually set the position in the other grids. > >Here is a form.cs file >http://www.syncfusion.com/Support/user/uploads/Form1_ba2ae191.cs > > >Please let me know if this helps. > >Thanks for choosing Syncfusion Products. >Best Regards, >Haneef > > >

Administrator [Syncfusion]
Replied On May 9, 2006 09:27 AM

Hi Yogi, Sorry for the inconvenience caused. Here is a link. http://www.syncfusion.com/Support/user/uploads/FormFile1_657914d8.zip Regards, Haneef

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.

;