Fix radgrid height with paging
How to fix the size of radgrid irrespective of records. I set the paging with pagesize = 5. When radgrid has 5 rows its height wil开发者_StackOverflow中文版l be ok. If the grid has 2 rows its fits to the 2 rows height. How to fix the radgrid height. I think you got my problem. I'm doing like this in page_load radgrid.Height=Unit.Pixel(200);
Hi can anyone answer my question..?
In the Databound() event handler, check for the number of records.
int c = RadGrid1.Items.Count()
Then try your:
RadGrid1.Height = Unit.Pixel( Whatever you want ) * c;
set the scroll height instead of setting the height. This makes sure that the whole data area height is maintained.
RadGrid1.ClientSettings.Scrolling.ScrollHeight = Unit.Pixel(200);
This article may help as well. http://www.telerik.com/help/aspnet-ajax/grid-height-vs-scrollheight.html
精彩评论