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

validation template

5 Answers 117 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Avi Avni
Top achievements
Rank 1
Avi Avni asked on 18 Oct 2010, 08:54 AM

Hello

How can I change the validation template of the row? (See attached picture).

How can I do validation in data Source Level and paint all the border of the grid in red if there errors?

Best regards

Ehud.

5 Answers, 1 is accepted

Sort by
0
Accepted
Vanya Pavlova
Telerik team
answered on 21 Oct 2010, 12:35 PM
Hello Ehud,

You can change the appearance of a row when it is either in valid or invalid states through editing the template of the row, and when the row goes into invalid state the ErrorIndicator appeared and the background of the row is changed. I recommend you to review the article as part from our online documentation that explains the Template structure of the GridViewRow. Also I have prepared an example for you that demonstrates how to modify the row and RadGridView when it goes into invalid state. Considering your second question you can achieve this effect quite easily depending on your custom scenario. You can read more about Validation mechanism that is used by RadGridView here.

Please see the attached and if you need any additional information please let me know.

Sincerely yours,
Vanya Pavlova
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Avi Avni
Top achievements
Rank 1
answered on 21 Oct 2010, 01:08 PM

Hello Vanya Pavlova

Thank you this what I needed

Best Regards

Ehud

0
Kadem Engin
Top achievements
Rank 1
answered on 11 Feb 2011, 10:31 PM
I'm using .NET 4 RadControls for WPF 2010.3.1110.40.
I have tried this solution in following manner and application crashed because of a StackOverflowException.

Just do following steps:
  1. Make one of the columns read-only,
  2. Add another controler below the grid (let's say, a button...)
  3. Run the application ,
  4. Edit one of the editable fields and press enter,
  5. Single click on a read-only cell
  6. Click on the button
  7. CRASH...

Any suggestions?

0
Kadem Engin
Top achievements
Rank 1
answered on 11 Feb 2011, 10:58 PM
I also found out that http://www.telerik.com/help/wpf/gridview-events-validation.html speaks of NewValues in GridViewCellValidatingEventArgs but there isn't such a thing.
0
Vanya Pavlova
Telerik team
answered on 15 Feb 2011, 03:31 PM
Hi Kadem,

 
Thank you for the detailed description of this case. Unfortunately, we are not able to reproduce such a behavior on our side following the steps described. Can you please send us a small application via support ticket where we can see what is going on ?

Regards,
Vanya Pavlova
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
GridView
Asked by
Avi Avni
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Avi Avni
Top achievements
Rank 1
Kadem Engin
Top achievements
Rank 1
Share this question
or