The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hello,
I am have been unable to successfully change column widths with my 3-level hierachy grid. I am using InternalColumns. I am using DataTables and DataSets as a data source. Snippet:
-------
GridHierarchyLevel level0 = gridDataBoundGrid1.Binder.RootHierarchyLevel;
level0.InternalColumns[1].MappingName = "test";
gridDataBoundGrid1.Model.ColWiths["test"]= 250;
-------
I would expect this to set the column width of the second column to 250. It does not. Changing the index or mapping name does not change any of the column widths. What am I doing wrong?
Thanks,
Nick
ADAdministrator Syncfusion Team June 22, 2006 06:41 PM UTC
Hi Nick,
In general grid should automatically resize columns to fit cell contents on first disply of the data. To turn off the this behavior, you need to set the AllowResizeToFit property to false. Please find the code snippet below.
this.gridDataBoundGrid1.AllowResizeToFit = false;
Let me know if this helps.
Best Regards,
Haneef