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

RadGrid Hide EditableItem

2 Answers 100 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Corina
Top achievements
Rank 1
Corina asked on 15 Nov 2011, 05:27 PM
Hi

I have a radgrid that uses in place editing (EditMode = InPlace). The radgrid also allows the user to click a button to turn on the filtering by column.

I don't want the edit row and search rows to both appear on the grid at the same time because it might confuse people as they both look similar.

I've been able to remove the filter row when the add new record button is pressed, but I can't seem to do the reverse? The filter button turns on filtering using the ItemCommand event, it's here that I want to turn off the edit row.

Can anyone advise me on how to do this please?

Thanks

2 Answers, 1 is accepted

Sort by
0
Accepted
Jayesh Goyani
Top achievements
Rank 2
answered on 16 Nov 2011, 07:17 AM
Hello,

void Button1_Click(object sender, EventArgs e)
   {
       RadGrid1.AllowFilteringByColumn = true;
       RadGrid1.MasterTableView.IsItemInserted = false;
       RadGrid1.MasterTableView.ClearEditItems();
       // if you used advance databinding then
       RadGrid1.Rebind();
       //else
       RadGrid1.DataSource = "Your DataSOurce";
       RadGrid1.DataBind();
 
 
   }


Thanks,
Jayesh Goyani
0
Corina
Top achievements
Rank 1
answered on 16 Nov 2011, 10:54 AM
Thanks Jayesh, that worked perfectly. :-)
Tags
Grid
Asked by
Corina
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Corina
Top achievements
Rank 1
Share this question
or