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. Image for the cookie policy date
close icon

ResizeToFit

I would like to perform RowHeights.ResizeToFit on the child table after the expand on parent table, how would I accomplish that? Thanks, Joe

1 Reply

AD Administrator Syncfusion Team July 19, 2005 07:32 PM UTC

Joe, try this code: private void gridGroupingControl1_RecordExpanded(object sender, RecordEventArgs e) { GridChildTable ct = e.Record.NestedTables[0].ChildTable as GridChildTable; // switch mode for TableModel ChildTable savedFilteredChildTable = ct.ParentTable.FilteredChildTable; try { ct.ParentTable.FilteredChildTable = ct; GridTableModel tm = ct.ParentTable.TableModel; tm.RowHeights.ResizeToFit(GridRangeInfo.Rows(0, tm.RowCount), GridResizeToFitOptions.ResizeCoveredCells); ct.ParentTable.FilteredChildTable = ct; } finally { ct.ParentTable.FilteredChildTable = savedFilteredChildTable; } } A sample project is here: ResizableRowsWithResizeToFit_F31912.zip Stefan >I would like to perform RowHeights.ResizeToFit on the child table after the expand on parent table, how would I accomplish that? > >Thanks, >Joe

Loader.
Live Chat Icon For mobile
Up arrow icon