Hi,
I added a RadGrid to my custom page.
I added a RadGrid to my custom page.
<asp:UpdatePanel ChildrenAsTriggers="true" UpdateMode="Conditional" runat="server"> <ContentTemplate> <telerik:RadGrid ID="rgProducts" runat="server" AutoGenerateColumns="false" Skin="WebBlue" OnItemInserted="rgProducts_ItemInserted" OnInsertCommand="rgProducts_InsertCommand" OnNeedDataSource="rgProducts_NeedDataSource" OnEditCommand="rgProducts_EditCommand"
OnItemUpdated="rgProducts_ItemUpdated"> <MasterTableView CommandItemDisplay="Top" AllowAutomaticInserts="True" EditMode="InPlace"> <Columns> <telerik:GridBoundColumn DataField="ProductId" HeaderText="Id" /> <telerik:GridBoundColumn DataField="ProductName" HeaderText="Name" /> <telerik:GridBoundColumn DataField="BuyerGroup" HeaderText="BuyerGroup" /> <telerik:GridEditCommandColumn EditText="Edit" CancelText="Cancel" HeaderText="" /> </Columns> </MasterTableView> </telerik:RadGrid> </ContentTemplate> </asp:UpdatePanel>When Grid is in edit mode, I fill required fields and press Update button, but this only fire Load event.
The event OnNeedDataSource fire properly, but events OnInsertCommand, OnEditCommand don't.
I try to create grid programmatic, but the effect is the same.
PageLoad function:
rgProducts_NeedDataSource function:
Adam
The event OnNeedDataSource fire properly, but events OnInsertCommand, OnEditCommand don't.
I try to create grid programmatic, but the effect is the same.
PageLoad function:
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { rgProducts.DataSource = OrderMoq.Products; } }rgProducts_NeedDataSource function:
protected void rgProducts_NeedDataSource(object sender, GridNeedDataSourceEventArgs e) { rgProducts.DataSource = OrderMoq.Products; }Adam