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.
ADAdministrator Syncfusion Team September 20, 2006 05:14 AM UTC
Hi Lim,
To resize the width of the column to fit the size of the text, you need to call the ResizeToFit method . Below is a code snippet.
//Resize the ColIndex depends on the cell( RowIndex , ColIndex); grid.Model.ColWidths.ResizeToFit(GridRangeInfo.Cell( RowIndex , ColIndex));
//Resize the both LeftColIndex and RightColIndex depend on the cells( TopRowIndex , LeftColIndex,,BottomRowIndex, RightColIndex); grid.Model.ColWidths.ResizeToFit(GridRangeInfo.Cells( TopRowIndex , LeftColIndex,,BottomRowIndex, RightColIndex));
//Resize the ColIndex depends on the all cell in the same column grid.Model.ColWidths.ResizeToFit(GridRangeInfo.Col( ColIndex));
Let me know if you are looking something different.
Best Regards, Haneef
ADAdministrator Syncfusion Team September 20, 2006 09:48 AM UTC
hi,
i am here to make my problem clearer..
my gridControl has a coveredRange of two column as below..
|___________| <-- Header one(Covered Range) |_____|_____| <--- Header two
how to set the column 2 to resize to fit the cell value?
grid.Model.ColWidths.ResizeToFit(GridRangeInfo.Col(2)); is not working in my grid..