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

Notify user when Insert/Update/Delete succeeds or fails

1 Answer 76 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Casey
Top achievements
Rank 1
Casey asked on 07 Dec 2010, 02:23 PM
Hello,

I have a RadGrid I am using for customer maintenance. I would like the users to be able to insert, update and delete customers from this RadGrid. I'd also like to notify them that "Insert for customer: XXXXXX succeeded", "Customer XXXXXX updated" or "Unable to delete customer XXXXXX" after the insert/update/delete either succeeds or fails. Since I am setting the RadGrid's DataSource property in the RadGrid1_NeedDataSource event, I don't think that I can use AllowAutomaticDeletes, AllowAutomaticInserts, or AllowAutomaticUpdates along with the ItemDeleted, ItemInserted, or ItemUpdated events (if I can, I must have been doing something wrong).

Is there a way to notify the user the status of the operation without setting the RadGrid's DataSourceID and enabling Automatic operations?

Thanks,
Casey

***EDIT - I was able to accomplish this by setting a session variable in the ItemCommand of the RadGrid and then adding a new literal control to the end of the RadGrid with the session variable text as the message. 

1 Answer, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 10 Dec 2010, 09:10 AM
Hi Casey,

If you are not using automatic operations for the grid, then I suppose you are performing your database updates/inserts/deletes manually in the ItemCommand event of the InsertItem/DeleteItem/UpdateItem events. In this case, you should know within those event whether the database operations have passed or not and use this information to perform the notification required.

Regards,
Tsvetoslav
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Grid
Asked by
Casey
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Share this question
or