Hi I am trying to update manually at row_updating event using row editing template. I am getting the following error. And I am not getting row_updating triggered yet. Can someone tell me if I am missing something?
[MissingRecordException]: Requested record cannot be found by key.
at Infragistics.Web.UI.GridControls.EditingCore.OnAction(String actionType, Object id, Object value, Object tag)
But I am setting DataKeyFields to Id column.
<ig:WebDataGrid ID="perfmonEventsGrid" runat="server" Height="100%" Width="100%" DataKeyFields="Id" OnRowUpdating="grid_RowUpdate"
DefaultColumnWidth="30px" AutoGenerateColumns="False" CssClass="griddata"
StyleSetName="RubberBlack">
<Columns>
<ig:BoundDataField DataFieldName="Id" Key="Id" Width="25px" >
<Header Text="Id" />
.
</Columns>
<Behaviors>
<ig:Activation />
<ig:RowSelectors />
<ig:ColumnResizing />
<ig:EditingCore AutoCRUD="false">
<ig:RowEditingTemplate CancelButton="buttonCancel" OKButton="buttonOK">
<EditModeActions MouseClick="Double" />
<ClientBindings>
<ig:RowEditingClientBinding ColumnKey="Name"
ControlID="control_Name"
GetValueJavaScript="$get({ClientID}).value"
SetValueJavaScript="$get({ClientID}).value={value}" />
<ig:RowEditingClientBinding ColumnKey="BriefDescription"
ControlID="control_BriefDescription"
<ig:RowEditingClientBinding ColumnKey="DetailDescription"
ControlID="control_DetailDescription"
<Template>
<div style="background-color: #CCCCCC; border: 1px solid black; width: 500px; height: 434px;">
<span class="style3"> Event Name:</span><br />
<asp:TextBox ID="control_Name" runat="server" ReadOnly="true" Width="250px" BackColor="#CCCCCC"
ForeColor="Black" Font-Bold="True" Font-Names="Verdana"></asp:TextBox>
<br />
<span class="style3"> Brief Description:</span><br />
<asp:TextBox ID="control_BriefDescription" runat="server" Height="42px" Width="477px"
TextMode="MultiLine" BackColor="White" ForeColor="Black"></asp:TextBox>
<span class="style3"> Public Description:</span><br />
<asp:TextBox ID="control_PublicDescription" runat="server" Height="191px" Width="476px"
<asp:Button ID="buttonOK" runat="server" Font-Names="Verdana" ForeColor="Black" OnClientClick="return"
Text="Save" UseSubmitBehavior="false" />
<asp:Button ID="buttonCancel" runat="server" CausesValidation="False" Font-Names="Verdana"
ForeColor="Black" OnClientClick="return" Text="Cancel" UseSubmitBehavior="False" />
</div>
</Template>
</ig:RowEditingTemplate>
</Behaviors>
</ig:EditingCore>
<ig:Paging PageSize="30" />
<ig:Sorting />
<ig:Filtering>
</ig:Filtering>
<ig:VirtualScrolling>
</ig:VirtualScrolling>
</ig:WebDataGrid>
CODE BEHIND
protected void grid_RowUpdate(object sender, Infragistics.Web.UI.GridControls.RowUpdatingEventArgs e)
{
// getting the above error before this point
//
}
Hello Cheers,
Were you able to resolve this issue?
For any further questions with this matter do not hesitate to contact me.
Sincerely,
Georgi Sashev
Developer Support Engineer
Infragistics, Inc.
http://es.infragistics.com/support
Hello cheers,
Thank you for posting this in our community. In order to support you further I would need to provide me with more details. Do you set the data source each time on post back is you data source primary key set to be column key field? Also which build of the controls are you using? And what are the settings of the buttons from the template? It would be even better if you can provide a whole sample reproducing this issue.
Looking forward hearing from you.