Dear all,
I have the case that if there is ultragrid with height=300 and when there are less records such that there is empty space below the records in the ultragrid, is there any method to shrink the ultragrid?
Hello rchiu5hk,
I believe that you would do this manually if you calculate the current height of your UltraGrid and compare it with the current height like:
int desiredHeight = (ultraGrid1.Rows.Count * ultraGrid1.Rows[0].Height + ultraGrid1.DisplayLayout.Bands[0].Columns[0].Header.Height); if (desiredHeight < 300) { ultraGrid1.Height = desiredHeight; }
Here you could add one more parameter if the GroupByBox is visible on your UI.
Please let me know if you need any further assistance with this case.
If there is a horizontal scroll bar in the ultragrid, how to do then?? Is there any better way??
Yes, the grid has a horizontal scrollbar. It's automatic by default. So you do not have to do anything.
Did you mean to say vertical? Your original post was asking about rows, but that has nothing to do with horizontal scrolling.