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.

resizing child table columns

Thread ID:

Created:

Updated:

Platform:

Replies:

97154 Nov 2,2010 07:49 AM Nov 8,2010 04:16 AM Windows Forms 1
loading
Tags: Grouping
Raul Rosenthal
Asked On November 2, 2010 07:49 AM

I have a three level master-detail grid grouping control.

The columns for all three tables are the same, and I want to keep their widths in sync.

That is, when the user resizes a column, I'd like the same column in the child tables to resize to the same width.

How can this be achieved?

Thanks.
Reagards
Raul


Nirmal Raja [Syncfusion]
Replied On November 8, 2010 04:16 AM

Hi Raul,

Thank you for your interest in Syncfusion products.

You could use the TrackWidthOfParentColumn property of a column descriptor to ensure that columns are aligned and stay in synchronized with parent table.

Please refer the code below:

// The TrackWidthOfParentColumn propetry of a column descriptor ensures that
// columns are aligned and stay in sync.

// synchronize width of columns in child record with width of column in parent record.
for (int n = 0; n < 3; n++)
parentToChildRelationDescriptor.ChildTableDescriptor.Columns[n].TrackWidthOfParentColumn = gridGroupingControl1.TableDescriptor.Columns[n].Name;

///same for grandchild table.
for (int n = 0; n < 3; n++)
childToGrandChildRelationDescriptor.ChildTableDescriptor.Columns[n].TrackWidthOfParentColumn = parentToChildRelationDescriptor.ChildTableDescriptor.Columns[n].Name;


Also please refer the sample attached below:
http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=GGC7570108.zip

Please let me know if this helps.

Regards,
Nirmal


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.

;