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.
I have a DataBoundGrid control on a panel. When it is populated with data I want the panel to be sized to display just the first two columns. I have a button which, when pressed, I want to expand the panel so that all columns are visible.
I don''t want to hide columns (ie the user can still scroll to the other columns when only the first two are visible).
I can''t work out how to find the right size parameters to pass to the Panel.ClientSize property. (I don''t need to change the height, it is just the width)
Thanks
ADAdministrator Syncfusion Team January 14, 2005 10:24 AM
To get the width of the first 2 column and the header column, try code like:
int width = grid.Model.ColWidths.GetTotal(0,2);
To get the width of all columns, try code like:
int width = grid.Model.ColWidths.GetTotal(0,grid.Model.ColCount);