Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
100
Set the ultraWinGrid height depending on the sum of all row height
posted

Hello,

I have a function that resize my grid height with the sum of all rows height but this method is really slow because the access to all the rows height property take too many time. Here is an example of what i mean:

   foreach (UltraGridRow row in grid.Rows)
             grid.height += row.height;

I found an other way to do it, faster but don't work if their is some multiline cell in the grid. I just multiply the number of row by the default row height:

    grid.Height = grid.Rows.Count * grid.DisplayLayout.Override.DefaultRowHeight;

I read in some forum that i can use the scrollBar size to determine the height of my grid but i don't know how to do.