I have a devexpress nested gridview. Both the master and detail gridviews have link buttons for edit and add new activities. After either inserting new row or updating an existing row, I have to show a message box saying "Your update has been saved successfully". This could be a simple javascript alert box or a message displayed on the page itself. Both the gridviews use objectdatasource. I tried the following codes in the RowUpdated event of both the gridview and the objectdatasource:
System.Web.HttpContext.Current.Response.Write("alert(Your updated has been saved successfully')");
or
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + Your updated has been saved successfully+ "');", true);
But in either case, no message box is displayed. If I used the same code in the button click event of a button on the page, then it works fine. I event tried to set the text value of a asp:Literal control. It also didn't work. Any help is greatly appreciated.
thanks
Handle ASPxGridView.RowInserted and ASPxGridView.RowUpdated grid events to set custom property containing message into ASPxGridView.JSProperties.
Then handle client side ASPxClientGridView.EndCallback event to check if custom property exists and raise alert.
Do the same for RowInserted event. There is similar example in DevEx support center.
Alternatively, you can use solution with e.command parameter.