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

RadGrid Pager Settings

1 Answer 94 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
vinit
Top achievements
Rank 1
vinit asked on 11 Jul 2008, 08:53 AM
Hello

I want to set visible false the below when there is less no. of records exists in the gridview.
Change page:GoPage size:Change

Where do I write a code to set the visible false of the pager?

Regards,

Vinit

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 11 Jul 2008, 11:29 AM
Hi Vinit,

Try the following code snippet to hide the Pager when the number of records in the Grid is less than the RadGrid PageSize.

CS:
 protected void RadGrid1_PreRender(object sender, EventArgs e) 
    { 
        string count = RadGrid1.MasterTableView.PageCount.ToString(); 
        if (count == "1") 
        { 
            RadGrid1.MasterTableView.PagerStyle.Visible = false
        } 
    } 


Thanks
Shinu.
Tags
General Discussions
Asked by
vinit
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or