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

hide paging when grid in editmode

1 Answer 30 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Erin
Top achievements
Rank 1
Erin asked on 02 Jan 2014, 02:49 PM
Hi.
How can we hide paging when grid in editmode?

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 02 Jan 2014, 02:52 PM
Hi Erin,

Please try the following code snippet:

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,
Shinu
Tags
Grid
Asked by
Erin
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or