This is a migrated thread and some comments may be shown as answers.

In Radgrid blank space is coming below the horizontal scroll bar if pagesize is lessthan 10

1 Answer 49 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Prathyusha
Top achievements
Rank 1
Prathyusha asked on 20 Oct 2011, 02:08 PM
Hi,

I am using Telerik Radgrid in my page.I am providing pagination 
facility to the columns in the grid. Here in the grid for the first time pagesize is selected as 10  and we can change the page size accordingly. If records in the grid are less than 10 then i am not showing the pagination . It is working fine in IE and Firefox but in Chrome for the first time blank space is coming below the horizontal scroll bar  but when a postback occurs from then it is coming fine.

Can you please help me on this issue.

 <PagerStyle Mode="NextPrevAndNumeric" />

Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 20 Oct 2011, 02:29 PM
Hello Prathyusha,

Try the following code snippet in the DataBound event to overcome the issue.
C#:
protected void rg1_DataBound(object sender, EventArgs e)
    {
        RadGrid grid = sender as RadGrid;
        int gridItems = grid.MasterTableView.Items.Count;
        if (gridItems < 7)
        {
            grid.ClientSettings.Scrolling.ScrollHeight = Unit.Pixel(gridItems * 24);
        }
    }

Thanks,
Shinu.
Tags
Grid
Asked by
Prathyusha
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or