Hi everybody,
my radgrid shows records from my DB, using inline editing with custom template such as a textbox "tbNT" and a checkbox "cbA".
I catch the RadGrid1_UpdateCommand event for update data on my DB.
I have found no way to get values from the "tbNT" textBox and "cbA" checkBox in the event function.
I would also like to know how to get the record (line in radgrid) that need updated data.
I have searched and tried quite a few methods from radgrid examples with no luck.
Thank you very much
Here is aspx code (part of):
| <telerik:RadGrid ID="RadGrid1" runat="server" Width="98%" |
| AllowPaging="True" AllowSorting="True" DataSourceID="SqlDataSource1" |
| CellPadding="1" Height="700px" BorderStyle="Solid" GridLines="Both" |
| AutoGenerateColumns="False" AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="True"> |
| <MasterTableView EditFormSettings-EditFormType="Template" DataSourceID="SqlDataSource1" |
| DataKeyNames="ArtID" Width="100%"> |
| <Columns> |
| <telerik:GridBoundColumn DataField="RssID" HeaderText="RssID" SortExpression="RssID" HeaderStyle-Width="50" UniqueName="RssID" DataType="System.Int32"> |
| <HeaderStyle Width="50px"></HeaderStyle> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Title" HeaderText="Titolo" |
| SortExpression="Title" |
| UniqueName="Title"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="PubDate" HeaderText="Data Pubblicazione" HeaderStyle-Width="100" |
| SortExpression="PubDate" |
| UniqueName="PubDate" DataType="System.DateTime"> <HeaderStyle Width="100px"></HeaderStyle> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="InsDate" DataType="System.DateTime" HeaderStyle-Width="100" |
| HeaderText="Data Inserimento" |
| SortExpression="InsDate" UniqueName="InsDate"> <HeaderStyle Width="100px"></HeaderStyle> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="NewTitle" HeaderText="Titolo Sito" HeaderStyle-Width="200" |
| SortExpression="NewTitle" |
| UniqueName="NewTitle"> |
| <HeaderStyle Width="200px"></HeaderStyle> |
| </telerik:GridBoundColumn> |
| <telerik:GridCheckBoxColumn DataField="Active" DataType="System.Boolean HeaderStyle-Width="50" |
| HeaderText="Attivo" |
| SortExpression="Active" UniqueName="Active"> <HeaderStyle Width="50px"></HeaderStyle> |
| </telerik:GridCheckBoxColumn> |
| <telerik:GridBoundColumn DataField="ActDate" HeaderText="ActDate" HeaderStyle-Width="100" |
| SortExpression="Data Attivazione" |
| UniqueName="ActDate" DataType="System.DateTime"> <HeaderStyle Width="100px"></HeaderStyle> |
| </telerik:GridBoundColumn> |
| </Columns> |
| <EditFormSettings EditFormType="Template"> |
| <FormTemplate> |
| <table id="Table5" cellspacing="2" |
| cellpadding="1" width="100%" border="0" rules="none" |
| style="border-collapse: |
| collapse; background: white;"> |
| <tr> |
| <td> |
| Nuovo Titolo: |
| <asp:TextBox ID="tbNT" runat="server" Text='<%# Bind( "NewTitle") %>' |
| Width="400" /> |
| |
| Attivo: <asp:CheckBox ID="cbA" runat="server" Text="" Checked='<%# Bind( "Active") %>' /> |
| |
| <asp:Button ID="btnUpdate" text="Aggiorna" runat="server" CommandName="Update"> |
| </asp:Button> |
| |
| <asp:Button ID="btnCancel" Text="Annulla" runat="server" CausesValidation="False" |
| CommandName="Cancel"> |
| </asp:Button> |
| </td> |
| </tr> |
| </table> |
| </FormTemplate> |
| </EditFormSettings> |
| </MasterTableView> |
| <ClientSettings> |
| <Scrolling AllowScroll="True" |
| UseStaticHeaders="True" /> |
| </ClientSettings> |
| </telerik:RadGrid> |