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.
Is there a way to calculate the amount of width that is required to display all of the bound columns in a grid?
I have a Search screen that displays different columns depending on the search. Rather than scrolling, it would be nice if I could calculate the dispaly width and size the form to accomodate the columns without forcing the user to scroll.
Based on my past inquiries, I imagine there is a way to do this.
Thanks in advance.
Anthony
SHStefan Hoenig Syncfusion Team September 30, 2002 10:39 PM UTC
You should be able to just call
grid.Model.ColWidths.GetTotal(0, grid.Model.ColCount)
plus add 2 pixels space for borders. Maybe 4. I haven't tested it...
Stefan