Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
695
Manual updating a row using template
posted

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">

            <Behaviors>

                <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" 

                                GetValueJavaScript="$get({ClientID}).value" 

                                SetValueJavaScript="$get({ClientID}).value={value}" />

                            <ig:RowEditingClientBinding ColumnKey="DetailDescription" 

                                ControlID="control_DetailDescription" 

                                GetValueJavaScript="$get({ClientID}).value" 

                                SetValueJavaScript="$get({ClientID}).value={value}" />

                    <Template>

                        <div style="background-color: #CCCCCC; border: 1px solid black; width: 500px; height: 434px;">

                            <span class="style3">&nbsp; 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">&nbsp; Brief Description:</span><br />

                            <asp:TextBox ID="control_BriefDescription" runat="server" Height="42px" Width="477px"

                                TextMode="MultiLine" BackColor="White" ForeColor="Black"></asp:TextBox>

                            <br />

                            <span class="style3">&nbsp; Public Description:</span><br />

                            <asp:TextBox ID="control_PublicDescription" runat="server" Height="191px" Width="476px"

                                TextMode="MultiLine" BackColor="White" ForeColor="Black"></asp:TextBox>

                            <br />

                            <br />

                            <asp:Button ID="buttonOK" runat="server" Font-Names="Verdana" ForeColor="Black" OnClientClick="return"

                                Text="Save" UseSubmitBehavior="false" />

                            &nbsp;&nbsp;

                            <asp:Button ID="buttonCancel" runat="server" CausesValidation="False" Font-Names="Verdana"

                                ForeColor="Black" OnClientClick="return" Text="Cancel" UseSubmitBehavior="False" />

                            <br />

                        </div>

                    </Template>

                </ig:RowEditingTemplate>

            </Behaviors>

        </ig:EditingCore>

        <ig:Paging PageSize="30" />

        <ig:Sorting />

        <ig:Filtering>

        </ig:Filtering>

        <ig:VirtualScrolling>

        </ig:VirtualScrolling>

    </Behaviors>

</ig:WebDataGrid>

 

CODE BEHIND

 

      protected void grid_RowUpdate(object sender, Infragistics.Web.UI.GridControls.RowUpdatingEventArgs e)

        {

        // getting the above error before this point

        //

        }