We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Display Width vs grid.width

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

1 Reply

SH Stefan Hoenig Syncfusion Team September 30, 2002 06:39 PM

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

Loader.
Live Chat Icon For mobile
Up arrow icon