My radgrid is looking good, but the Edit/Insert functions are not being called. I customized the radgrid sample so that I could programmatically use my ORM, so i'm thinking it has to do with ORM somehow. When I click the pencil icon to "edit" a row, all the fields become editable, however when I hit the checkmark icon to "save" my changes my back-end functions are not being called:
protected void radgridGenotype_ItemInserted(object source, GridInsertedEventArgs e)
{
}
protected void radgridGenotype_ItemUpdated(object source, Telerik.Web.UI.GridUpdatedEventArgs e)
{
GridEditableItem item = (GridEditableItem)e.Item;
String id = item.GetDataKeyValue("IdGenotype").ToString();
}
This is my radgrid:
<telerik:RadGrid ID="radgridGenotype" runat="server" Width="100%" Skin="Vista"
AllowAutomaticDeletes="true" AllowAutomaticInserts="false" AllowAutomaticUpdates="false"
OnNeedDataSource="radgridGenotype_NeedDataSource" OnDataBound="radgridGenotype_DataBound"
OnItemInserted="radgridGenotype_ItemInserted" OnItemUpdated="radgridGenotype_ItemUpdated"
AutoGenerateColumns="False" GridLines="None" AllowMultiRowEdit="true">
<MasterTableView DataKeyNames="IdGenotype" EditMode="InPlace" Width="100%" CommandItemDisplay="Bottom" HorizontalAlign="NotSet">
<Columns>
<telerik:GridEditCommandColumn ButtonType="ImageButton">
<ItemStyle CssClass="MyImageButton" Width="30px" />
</telerik:GridEditCommandColumn>
<telerik:GridBoundColumn DataField="GenotypeResultCode" HeaderText="Code" SortExpression="GenotypeResultCode"
UniqueName="GenotypeResultCode" ColumnEditorID="GridTextBoxColumnEditor1" />
<telerik:GridBoundColumn DataField="GenotypeResultDescription" HeaderText="Description" SortExpression="GenotypeResultDescription"
UniqueName="GenotypeResultDescription" ColumnEditorID="GridTextBoxColumnEditor1" />
<telerik:GridBoundColumn DataField="GenotypeTest" HeaderText="Test" SortExpression="GenotypeTest"
UniqueName="GenotypeTest" ColumnEditorID="GridTextBoxColumnEditor1" />
</Columns>
<EditFormSettings ColumnNumber="1" CaptionDataField="GenotypeResultCode" CaptionFormatString="Edit properties of Genotype {0}">
<EditColumn ButtonType="ImageButton" InsertText="Insert Order" UpdateText="Update record"
UniqueName="EditCommandColumn1" CancelText="Cancel edit">
</EditColumn>
<FormTableStyle CellSpacing="0" CellPadding="2" Height="110px" BackColor="White" />
<FormMainTableStyle CellSpacing="0" CellPadding="3" BackColor="White" Width="100%" />
<FormCaptionStyle CssClass="EditFormHeader"></FormCaptionStyle>
<FormTableItemStyle Wrap="False"></FormTableItemStyle>
<FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle>
<FormTableButtonRowStyle HorizontalAlign="Right" CssClass="EditFormButtonRow"></FormTableButtonRowStyle>
</EditFormSettings>
</MasterTableView>
</telerik:RadGrid>