or
OnUpdateCommand="RadGrid2_UpdateCommandfor the first version and
OnItemCommand="RadGrid1_ItemCommand"for the second version.
First I put radgrid item in editmode with first button:
RadGrid2.EditIndexes.Add(0);RadGrid2.Rebind();if (commandButton.CommandName.ToLower() == "update") { foreach (GridEditFormItem item in RadGrid2.MasterTableView.GetItems(GridItemType.EditFormItem)) { RadGrid2.MasterTableView.PerformUpdate(item, true); // first version item.FireCommandEvent("Update", string.Empty); //second version }
<EditFormSettings EditFormType="Template" > <EditColumn UniqueName="EditColumn"></EditColumn> <FormTemplate> <div> <tr> <td> Inicijali </td> <td> <telerik:RadTextBox ID="Inicijali" runat="server" Font-Names="Verdana" Font-Size="Small" Text='<%# Bind("Inicijali") %>'> </telerik:RadTextBox> </td> </tr> <tr> <td> Kratica imena </td> <td> <telerik:RadTextBox ID="KraticaImena" runat="server" Font-Names="Verdana" Font-Size="Small" Text='<%# Bind("KraticaImena") %>'> </telerik:RadTextBox> </td> </tr>.....</table>RadGrid definition:
<telerik:RadGrid ID="RadGrid2" runat="server" DataSourceID="DetailsViewSQLDataSource" AutoGenerateColumns="false" OnUpdateCommand="RadGrid2_UpdateCommand" OnItemCommand="RadGrid1_ItemCommand" AllowAutomaticUpdates="true"> <MasterTableView DataSourceID="DetailsViewSQLDataSource" AutoGenerateColumns="true" DataKeyNames="IdOsobe" ShowHeader="false" EditMode="EditForms" AllowAutomaticInserts="true">protected void RadGrid2_UpdateCommand(object sender, GridCommandEventArgs e) { if (e.CommandName == RadGrid.UpdateCommandName) { if (e.Item is GridEditFormItem) { GridEditFormItem item = (GridEditFormItem)e.Item; int id = Convert.ToInt32(item.GetDataKeyValue("IdOsobe")); if (id != 0) { RadTextBox txtInicijali = (RadTextBox)item.FindControl("Inicijali"); RadGrid1.Rebind(); } } } }<telerik:RadWindowManager ID="SupIntdRadWindowManager" runat="server" EnableShadow="true" DestroyOnClose="true" Behaviors="Close,Move,Resize,Pin"
AutoSize="true" VisibleStatusbar="false" Overlay="true" ShowContentDuringLoad="false" ReloadOnShow="true"
Modal="true" />
var radWin = window.radopen("Something/foo.aspx");
radWin.SetTitle("Foo");
return false;