Hi, i'm studying the example
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/usercontroleditform/defaultcs.aspx
I replace all and it's ok, one thing is wrong in my example, when I add a new record after confirm the usercontrol don't hide as in Update event.
The usercontrol after confirm insert is cleared but is visible in grid.
I can try with
in the InsertCommand of RadGrid but don't work.
This is my RadGrid
Thanks,
Marco
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/usercontroleditform/defaultcs.aspx
I replace all and it's ok, one thing is wrong in my example, when I add a new record after confirm the usercontrol don't hide as in Update event.
The usercontrol after confirm insert is cleared but is visible in grid.
I can try with
e.Canceled = true;gvList.SelectedIndexes.Clear();this.gvList.MasterTableView.Rebind();This is my RadGrid
<telerik:RadGrid ID="gvList" runat="server" AllowPaging="True" AllowSorting="True" ShowStatusBar="True" CellSpacing="0" GridLines="None" Skin="Office2010Blue" AutoGenerateColumns="False" OnNeedDataSource="gvList_NeedDataSource" OnDeleteCommand="gvList_DeleteCommand" AllowAutomaticUpdates="false" PageSize="20" OnInsertCommand="gvList_InsertCommand" OnUpdateCommand="gvList_UpdateCommand"> <HeaderStyle Font-Bold="true" /> <MasterTableView CommandItemDisplay="Top" DataKeyNames="d61_n_tipo" AllowAutomaticInserts="True" CommandItemSettings-AddNewRecordImageUrl="Images/Grid/add2.png" CommandItemSettings-AddNewRecordText="AGGIUNGI NUOVA TIPOLOGIA" CommandItemSettings-RefreshImageUrl="Images/Grid/refresh.png" CommandItemSettings-RefreshText="AGGIORNA LISTA"> <Columns> <telerik:GridBoundColumn DataField="d61_n_tipo" UniqueName="d61_n_tipo" Visible="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="d61_n_tipo" HeaderText="CODICE"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="d61_c_descrizione" HeaderText="DESCRIZIONE"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="d60_c_descrizione" HeaderText="TIPI BASE"> </telerik:GridBoundColumn> <telerik:GridCheckBoxColumn DataField="d61_n_flag_obsoleto" HeaderText="OBSOLETO"> </telerik:GridCheckBoxColumn> <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" EditImageUrl="~/Images/Grid/edit.png" EditText="Modifica" ItemStyle-HorizontalAlign="Center" ButtonType="ImageButton" ItemStyle-Width="3%"> </telerik:GridEditCommandColumn> <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" ConfirmDialogType="RadWindow" ConfirmText="Confermare l'eliminazione del record ?" ConfirmTitle="Conferma eliminazione" ImageUrl="~/Images/Grid/delete2.png" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="3%" Text="Elimina" UniqueName="DeleteColumn"> <ItemStyle HorizontalAlign="Center" Width="3%" /> </telerik:GridButtonColumn> </Columns> <EditFormSettings UserControlName="ucGridTipologieUfficiali.ascx" EditFormType="WebUserControl"> <EditColumn UniqueName="EditCommandColumn1"> </EditColumn> </EditFormSettings> </MasterTableView> <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True"> </ClientSettings> <FilterMenu EnableImageSprites="False"> </FilterMenu> </telerik:RadGrid>Thanks,
Marco