resizing child table columns

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


1 Reply

NR Nirmal Raja Syncfusion Team November 8, 2010 09:16 AM UTC

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


Loader.
Up arrow icon