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.
Hi,
I have a problem resizing header cells in a grid. I am using the new version 1.6.1.0 and I realized that the method ResizeToFit(xxx) now is working.
But here's what's happening or better what's not happening:
I want the following: I have a grid with a header row and in each cell there's a text oriented by 90 degrees. Because of the length of the text I want it to be wrapped in the cells and after that the row width should be resized to fit the contents (the wrapped text!).
I played around a lot with the following, but nothing worked fine (ResizeToFit, WrapText, Trimming, AutoSize). I realized that the ResizeToFit method ignores the wrapText property and the autosize property doesn't affect anything.
Is there a way to get it done - to auto resize wrapped cell content?
Any help I appreciate
Michael
ADAdministrator Syncfusion Team June 24, 2003 12:48 PM UTC
It is not perfect, but if you insert \r\n (ie. Environment.NewLine) to hard break your text where you want the breaks, then calling
this.gridControl1.RowHeights.ResizeToFit(...)
this.gridControl1.ColWidths.ResizeToFit(...)
back to back will size both the row height and colwidth to fit the text with the hard breaks.