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
close icon

Calculating total visible cell widths and heights

I''m trying to figure out how to calculate the total height and width of the visible cells in a scrollable grid. I need to know the total height and width including the any fixed header cells. I was originally using the GridViewLayout.GetColRangeWidth() (and the equivalent for rows), but this weekend I finally upgraded from 1.5 to 2.0.5 and found that these methods have been deprecated. Thanks. Pete

2 Replies

AD Administrator Syncfusion Team May 3, 2004 12:18 PM UTC

Try int width = grid.ColWidths.GetTotal(0, grid.Cols.FrozenCount) + grid.ColWidths.GetTotal(grid.LeftColIndex, grid.Viewlayout.LastVisibleCol); There are similar propeties/methods for RowHeights.


AD Administrator Syncfusion Team May 3, 2004 12:21 PM UTC

Thanks Clay. That did it. Pete Davis >Try > >int width = grid.ColWidths.GetTotal(0, grid.Cols.FrozenCount) + grid.ColWidths.GetTotal(grid.LeftColIndex, grid.Viewlayout.LastVisibleCol); > > >There are similar propeties/methods for RowHeights.

Loader.
Live Chat Icon For mobile
Up arrow icon