This is a migrated thread and some comments may be shown as answers.

Update asp:label with completed Insert/Update action

1 Answer 36 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kurt Kluth
Top achievements
Rank 1
Kurt Kluth asked on 23 Sep 2014, 10:03 PM
Use the following code to Insert/Update/Select our RadGrid, however what I need to display on successful completion of Insert/Update is a message indicating that.  How do I update _lblErrorMessage?  Thanks

<asp:Label ID="_lblErrorMsg" runat="server" Text="" CssClass="alert"></asp:Label>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:FMS_Conn %>"
               SelectCommand="sp_getTopCreditUnions" SelectCommandType="StoredProcedure"
               DeleteCommand="sp_DelTopCreditUnion" DeleteCommandType="StoredProcedure"
               InsertCommand="sp_InsTopCreditUnion" InsertCommandType="StoredProcedure">
            <DeleteParameters>
                <asp:Parameter Name="asi_num" Type="Int32" ></asp:Parameter>
                <asp:SessionParameter Name="user_id" SessionField="user_id" Type="String" />
            </DeleteParameters>
              <InsertParameters>
                  <asp:Parameter Name="asi_num" Type="Int32" ></asp:Parameter>
                  <asp:SessionParameter Name="user_id" SessionField="user_id" Type="String" />
              </InsertParameters>
          </asp:SqlDataSource>
          <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:FMS_Conn %>"
               SelectCommand="sp_getASI_CreditUnions" SelectCommandType="StoredProcedure">
          </asp:SqlDataSource>

1 Answer, 1 is accepted

Sort by
0
Accepted
Radoslav
Telerik team
answered on 26 Sep 2014, 08:37 AM
Hello Kurt,

To achieve the desired functionality you can handle the RadGrid.ItemUpdated and RadGrid.ItemInserted events and show the message. On the following example you can see similar scenario:
http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/form-template-update/defaultcs.aspx

I hope this helps

Regards,
Radoslav
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Kurt Kluth
Top achievements
Rank 1
Answers by
Radoslav
Telerik team
Share this question
or