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
420
Showing errors on WebDataGrid
posted

I did a bit of reading about ErrorTemplates and things related to WebDataGrids. I am able to write the error message to the ErrorTemplate and throw exceptions and to get the exception (as a whole) to the JavaScript dialog, but the desired state would be something like this:

1) Client deletes a row by clicking delete key.

2) We catch RowsDeleting event and some checks for the rows being deleted.

3)  If rows should not be deleted, we cancel the delete event and notify the user about this.

The notification part seems to be quite hidden somewhere in the bowels of the WebDataGrid. How can I access it and implement step three?

 

 

 

 

 

protected void WebDataGrid1_RowsDeleting(object sender, Infragistics.Web.UI.GridControls.RowDeletingEventArgs e)

{

 

 

 

 

if (e.Row.Items[i].Column.Key == "something")

{

 

 

 

if (e.Row.Items[i].Value.ToString().Equals("else"))

e.Cancel = true;

// SHOW ERROR FOR THE USER!

 

...

...

...

Parents Reply Children
No Data