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

RadGridView Validation Styling

5 Answers 363 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Arthur
Top achievements
Rank 1
Arthur asked on 11 Jul 2012, 11:44 AM
Hi all,

I am currently using the RadGridView with the IDataErroInfo interface to perform validation with my View Model.

This is currently working as expected but I would like to change the cell validation style, in particular the tooltip and the how the red border around the cell works.

I would like to continue to use the IDataErrorInfo interface for the validation but just change the error template being used (rather then to start building cell template selectors for example)

Thanks in advance!

5 Answers, 1 is accepted

Sort by
0
Arthur
Top achievements
Rank 1
answered on 12 Jul 2012, 01:44 PM
Update,

I have followed this guide http://www.telerik.com/help/wpf/gridview-styling-cell.html to generate the template for the GridViewCell.

However, although I can use this template to style many properties of the Grid, it doesn't allow me to change the validation border or the tool tip . 

With further investigation if I change the edit template to a text block rather than the default text box then both the default border and the border set in the generated style appears.

Is there no way to remove the default tooltip and red validation border??

I was hoping to get a template similar to this for silverlight 

(http://www.telerik.com/community/forums/silverlight/gridview/setting-error-message-to-show-error-tooltip-cellvalidating-event.aspx)


which I could then style to suit my needs.


Any help here would be much appreciated




0
Ivan Ivanov
Telerik team
answered on 13 Jul 2012, 07:36 AM
Hi Arthur,

These elements are not included in GridViewCell's template. In order to achieve this you should predefine GridViewEditorPresenter's Template. The validation border is named: "ValidationErrorElement". Please let us know if you need any further assistance with this.

Regards,
Ivan Ivanov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Arthur
Top achievements
Rank 1
answered on 13 Jul 2012, 09:05 AM
OK thanks,

For anyone interested a sample is available here

http://www.telerik.com/community/forums/wpf/gridview/validation-error-tooltip.aspx

0
Aarvey
Top achievements
Rank 1
answered on 28 Mar 2013, 03:35 PM
I am getting a red border around the row when i am selecting a row and remains red. i don't want to show this red borer. My grid is read only, but i have done a two way data binding with the IsSelected property of the row. I tried to remove this border by setting ValidatesOnDataErrors="None", but this is not working. How can i remove the red border ?
0
Yoan
Telerik team
answered on 01 Apr 2013, 02:08 PM
Hi Aarvey,

Can you give us more details how the validation is performed in your application? Are you using DataAnnotations? It will be great if you can send us a sample project which reproduces the problem? We will debug it on our side and will check what is going on.


Kind regards,
Yoan
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
Arthur
Top achievements
Rank 1
Answers by
Arthur
Top achievements
Rank 1
Ivan Ivanov
Telerik team
Aarvey
Top achievements
Rank 1
Yoan
Telerik team
Share this question
or