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

Determine if the grid has errors

1 Answer 123 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Deborah
Top achievements
Rank 1
Deborah asked on 31 Jul 2012, 11:20 PM
I have code in the CellValidating event that sets ErrorText to display errors.

If the user then clicks the Save button, i'd like to display a message saying "Gotta fix those errors first".

Is there a way to ask the grid if it has any errors? Or do I need to loop through every cell and check its errortext?

Thanks!

1 Answer, 1 is accepted

Sort by
0
Julian Benkov
Telerik team
answered on 02 Aug 2012, 11:24 AM
Hi Deborah,

Thank you for writing.

RadGridView does not support this functionality out of the box. You can define one boolean field member in your class to implement this behavior. The value can be controlled in your CellValidating event handler and then check the value of the field member in your Save button event handler to show the MessageBox.

I hope that you find this information useful. Let us know if you have any other questions.

All the best,
Julian Benkov
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
Tags
GridView
Asked by
Deborah
Top achievements
Rank 1
Answers by
Julian Benkov
Telerik team
Share this question
or