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

Edit multiple rows

3 Answers 196 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Layo
Top achievements
Rank 1
Layo asked on 07 Sep 2012, 08:40 PM
Hello everyone.
Currently when you want to edit a row in a radgrid, press the Edit button (with GridEditCommandColumn), but this control is only to enable editing of a single row (where I pressed edit).
My question is: Is there a way to press a button outside the radgrid and enable all rows in the radgrid and not just one?
thank you very much

3 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 10 Sep 2012, 04:19 AM
Hi,

Try the following code to achieve your scenario.
C#:
protected void Button1_Click(object sender, EventArgs e)
{
        foreach (GridDataItem item in RadGrid1.Items)
        {
            item.Edit = true;
        }
        RadGrid1.MasterTableView.Rebind();      
}

Note: Set AllowMultiRowEdit as true for RadGrid.

Thanks,
Shinu.
0
Layo
Top achievements
Rank 1
answered on 10 Sep 2012, 01:52 PM
Hi, and thanks for your answer 
I tried what you said, i have other question.
with item.Edit = true; it created an other "div" with the fields and theirs associated  texBox .
but what i want is that , when i press the button edit, every cells of every row in the radGrid it be editable. 
example, something like this: 

http://desmond.imageshack.us/Himg717/scaled.php?server=717&filename=gridl.jpg&res=landing
0
Layo
Top achievements
Rank 1
answered on 10 Sep 2012, 07:14 PM
checking my code I saw that I was a few parameters in the. aspx.
and your code works perfectly.
thank you very much Shinu.
Tags
Grid
Asked by
Layo
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Layo
Top achievements
Rank 1
Share this question
or