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

HOW TO HIDE Paging control when open the edit form

1 Answer 32 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Chi Ming
Top achievements
Rank 1
Chi Ming asked on 25 Jun 2013, 08:51 PM
Hi everyone,

Please tell me how to hide paging control in the radgrid when the user opens either edit or insert form in the usercontrol.

Thank you,
Chi Ming

1 Answer, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 1
answered on 26 Jun 2013, 07:53 AM
Hi Chi Ming,

Please try the following code I tried which works fine at my end.

C#:
protected void RadGrid1_PreRender(object sender, EventArgs e)
{
    GridPagerItem pagerItem = (GridPagerItem)RadGrid1.MasterTableView.GetItems(GridItemType.Pager)[1];
 
    if (RadGrid1.EditIndexes.Count > 0 || RadGrid1.MasterTableView.IsItemInserted) // Item is in the Edit or Insert Mode 
        pagerItem.Display = false;
    else
    {
        pagerItem.Display = true;
    }
}

Thanks,
Princy.
Tags
Grid
Asked by
Chi Ming
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 1
Share this question
or