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
1910
WebDataGrid RowEditing - Saving data to database once I press the Done button
posted

I have been able to get the select, insert, and delete to work but am having trouble with the edit. Running the edit query in sql edits the table correctly. When the user presses the done button, the data seems to save to the grid but not the table in the database. Am I missing something? Is there a way to capture if the done button has been pressed?

<ig:WebDataGrid ID="grid_Upcoming_Events" runat="server" Height="100%" Width="98%" AutoGenerateColumns="False" DataSourceID="dsUpcoming_Events" DataKeyFields="Event_ID">
<Columns
<ig:BoundDataField DataFieldName="Event_ID" Key="Event_ID"></ig:BoundDataField>
<ig:BoundDataField DataFieldName="Event_Name" Key="Event_Name">
<Header Text="Event">
</Header>
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="Event_Description" Key="Event_Description" EnableMultiline="True">
<Header Text="Description">
</Header>
</ig:BoundDataField>
</Columns>
<Behaviors>
<ig:Sorting>
</ig:Sorting>
<ig:EditingCore BatchUpdating="True">
<Behaviors>
<ig:RowDeleting ButtonHtml="Delete" ShowDeleteButton="True">
</ig:RowDeleting>
<ig:RowAdding>
<ColumnSettings>
<ig:RowAddingColumnSetting ColumnKey="Event_Name" />
<ig:RowAddingColumnSetting ColumnKey="Event_Description" />
</ColumnSettings>
<EditModeActions MouseClick="Single" />
</ig:RowAdding>
<ig:RowEditing>
<ColumnSettings>
<ig:EditingColumnSetting ColumnKey="Event_Name" />
<ig:EditingColumnSetting ColumnKey="Event_Description" />
</ColumnSettings>
<EditModeActions MouseClick="Single" />
</ig:RowEditing>
</Behaviors>
</ig:EditingCore>
<ig:Selection CellClickAction="Row" RowSelectType="Single">
</ig:Selection>
<ig:RowSelectors>
</ig:RowSelectors>
</Behaviors>
</ig:WebDataGrid>

<asp:SqlDataSource ID="dsUpcoming_Events" runat="server" ConnectionString="<%$ ConnectionStrings:csIntranet %>" SelectCommand="usp_sel_Upcoming_Events" SelectCommandType="StoredProcedure" InsertCommand="usp_ins_Upcoming_Events" InsertCommandType="StoredProcedure" DeleteCommandType="StoredProcedure" DeleteCommand="usp_del_Upcoming_Events" UpdateCommandType="StoredProcedure" UpdateCommand="usp_upd_Upcoming_Events">
<InsertParameters>
<asp:Parameter Name="Event_Name" Type="String" />
<asp:Parameter Name="Event_Description" Type="String" />
</InsertParameters>
<DeleteParameters>
<asp:Parameter Name="Event_ID" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="Event_ID" Type="Int32" />
<asp:Parameter Name="Event_Name" Type="String" />
<asp:Parameter Name="Event_Description" Type="String" />
</UpdateParameters>
</asp:SqlDataSource>

  • 1740
    Offline posted

    Hello Angela,

    It would be highly appreciated if you could send me an isolated working sample, because it costs us a significant amount of time to set up and adjust the sample based on the template only.

    Thanks for your understanding.