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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Create/Edit hierarchical data in Grid - Help

Thread ID:

Created:

Updated:

Platform:

Replies:

77551 Nov 5,2008 07:18 PM UTC Nov 17,2008 06:32 AM UTC WinForms 3
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On November 5, 2008 07:18 PM UTC

Hello,

Is possible create hierarchical data in Grid without one data collection loaded for levels (parents and childs), only with code? How?
My application need create/edit the hierarchical data in runtime, like select one cell (first column) in Grid and click in "Expand Selected column" (like Excel).

Thanks for all help.

For example, see my attached image.



imagemx_70152fab.zip

Nisha Arockiya A [Syncfusion]
Replied On November 11, 2008 11:09 AM UTC

Hi Rossa,

Thanks for your interest in Syncfusion Products.

Hierarchical Data can be created by defining relation between Parent and Child Datatable.Please refer to the code snippet below.

DataTable parentTable = GetParentTable();
DataTable childTable = GetChildTable();
DataSet ds = new DataSet();
ds.Tables.AddRange(new DataTable[] { parentTable, childTable });
ds.Relations.Add(new DataRelation("ParentToChild", ds.Tables[0].Columns["parentID"], ds.Tables[1].Columns["ParentID"]));
this.gridGroupingControl1.DataSource = parentTable;


Here is a minimal sample:
http://websamples.syncfusion.com/samples/Grid.Windows/Development/GGC_Hierarchy_F77551.zip

Please let me know if this is your requirement or am I missing any thing??

Regards,
Nisha



Administrator [Syncfusion]
Replied On November 11, 2008 11:44 AM UTC

Hi Nisha,

Thanks for you reply, in my case I need create (layout) hierarchical data in runtime (virtual mode), where all "relations" (only layout) are created on demand.
Why? My collection not contain relations with data fields, not contain data fields keys, only has relation "parent-childs" defined on demand.
I found in Syncfusion Samples (.Net Win Forms) the application "VirtTree Grid", it's basically I need.

I codified some applications like this sample found, I write my questions in soon.

Thanks



Nisha Arockiya A [Syncfusion]
Replied On November 17, 2008 06:32 AM UTC

Hi Rossa,

Thanks for the updates.

We are waiting to hear from you.

Regards,
Nisha


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

;