I am using one rad grid
<
telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="false" Skin="Office2007" AutoGenerateEditColumn="false"
OnNeedDataSource="NeedData" AllowAutomaticInserts="True" AllowAutomaticUpdates="True"
OnInsertCommand="Insert" OnUpdateCommand="Update">
<MasterTableView CommandItemDisplay="TopAndBottom">
<Columns>
<telerik:GridTemplateColumn UniqueName="Attribute">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind( "Attribute" ) %>'></asp:Label>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn UniqueName="Val">
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# Bind( "Val" ) %>'></asp:Label>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridEditCommandColumn HeaderText="Action">
</telerik:GridEditCommandColumn>
</Columns>
<EditFormSettings EditFormType="Template">
<FormTemplate>
<asp:TextBox ID="txtAttribute" runat="server" Text='<%# Bind( "Attribute" ) %>'></asp:TextBox>
<asp:TextBox ID="txtVal" runat="server" Text='<%# Bind( "Val" ) %>'></asp:TextBox>
<asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
</asp:Button>
<asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
CommandName="Cancel"></asp:Button>
</FormTemplate>
</EditFormSettings>
</MasterTableView>
</telerik:RadGrid>
Now how to hide the edit form after the Insert ? like the cancel
protected
void Insert(object source, GridCommandEventArgs e)
{
// some code
}
please help, it is very urgent.