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

making all rows in grid editable when page loading

4 Answers 70 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Milan Gurung
Top achievements
Rank 1
Milan Gurung asked on 12 Sep 2008, 02:42 PM
Hi,

Can someone help me out to make all rows' item in grid editable when the page is loading first time?

I tried to use the loop below in pre-render event - but it does not seem to work. It will make on the last row editable. 

<Columns>
<

telerik:GridTemplateColumn DataField="Data" UniqueName="Data">
<ItemTemplate>
<asp:Label Text='<%#Eval("Data")%>' runat="server"></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtData" runat="server"></asp:TextBox>
</EditItemTemplate>
</telerik:GridTemplateColumn>
</Columns>




Protected Sub planGrid_PreRender(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles planGrid.PreRender

Dim item As GridDataItem

For Each item In planGrid.MasterTableView.Items

item.Edit =

True

Next

planGrid.Rebind()

End Sub



Thanks a lot.

Milan G

4 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 12 Sep 2008, 02:47 PM
Hi Milan,

You need to set AllowMultiRowEdit to true for the grid.

All the best,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Milan Gurung
Top achievements
Rank 1
answered on 12 Sep 2008, 02:59 PM
Thanks for the suggestion.

Is there any way I can use a single button to update the rad grid to update all  changes made on each row of the grid.

Thanks again.

Milan G
0
Vlad
Telerik team
answered on 12 Sep 2008, 03:02 PM
Hello Milan,

You can fire UpdateEdited command to achieve this. Please check this article for more info:
http://www.telerik.com/help/aspnet-ajax/grdfirecommandeventfromcode.html

Greetings,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Shinu
Top achievements
Rank 2
answered on 15 Sep 2008, 05:52 AM
Hi Milan,

You can also refer the following help article to get more details on performing Batch updates in RadGrid.
Performing batch updates

Cheers
Shinu.

Tags
Grid
Asked by
Milan Gurung
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Milan Gurung
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Share this question
or