Hi khanh,
Thanks for contacting Syncfusion support.
In SfDataGrid, there is no direct support to set different width for each indent columns. However you can achieve this requirement by setting the width of the indent column manually when multiple groups are added to the DataGrid as shown in the following code example.
Code example:
|
this.sfDataGrid1.GroupColumnDescriptions.CollectionChanged += GroupColumnDescriptions_CollectionChanged;
private void GroupColumnDescriptions_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
{
this.sfDataGrid1.BeginInvoke(new Action(() => {
if (this.sfDataGrid1.GroupColumnDescriptions.Count > 1)
{
this.sfDataGrid1.TableControl.ColumnWidths[0 + Convert.ToInt16(this.sfDataGrid1.ShowRowHeader)] = 50;
this.sfDataGrid1.TableControl.ColumnWidths[1 + Convert.ToInt16(this.sfDataGrid1.ShowRowHeader)] = 200;
this.sfDataGrid1.TableControl.Invalidate();
}
}));
} |
Please let us know if you require further assistance from us.
Regards,
Mohanram A.