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

Hide Filter Row When Editing a Record

1 Answer 38 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 23 Sep 2010, 08:11 PM
Group,
I have a RadGrid and I want to be able to hide the row of filters when I am in the OnEditcommand.  I can do it using Javascript by selecing radio buttons or clicking a button, but I just want it to automatically hide when in edit mode.

I tried using
gvProductionRuns.AllowFilteringByColumn = !gvProductionRuns.AllowFilteringByColumn;

but it causes issue with what record I am actually updating. I know there has to be an easy solution to this, but I am not finding it.

Any help is greatly appreciated!

1 Answer, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 24 Sep 2010, 06:44 AM
Hi Jon,


The following code snippet will help you in this.

Code:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridEditableItem && e.Item.IsInEditMode)
    {
        RadGrid1.MasterTableView.GetItems(GridItemType.FilteringItem)[0].Visible = false;
    }
}


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