I have window with a RadGrid, bound to a collection of products. The Product domain object implements INotifyPropertyChanged and IDataErrorInfo(all my validation rules resides within my domain objects).
Problem : When I change a field and tab out, the validation rule fails. This works fine, but my radgridcell renders multiple red borders(adorners) within the cell.
I looked at the online sample code. When I remove the IDataErrorInfo from my domain object, and implement the CellValiding event on my window code behind, this issue seems to be resolved. I dont like this option, because I want my validation logic in my domain.
How do I solve the above mentioned issues. Is it possible to style my gridrow, gridcells to hide some of the inner borders?
8 Answers, 1 is accepted
Have you tried to set ValidatesOnDataErrors property of RadGridView to InViewMode?"
the Telerik team
Yes I have. It still renders a red border around the cell, and another one inside the cell.
Is there a way to hide the outer border?
I opened the application in snoop - it seems that the outside adorner is part of the grids PART_RootPanel`s ScollContentPresenter.
Actually you need ValidatesOnDataErrors="InEditMode", since "InViewMode" will draw a red border around the invalid cell in view mode. Could you tell me which is the exact version which you are using, since I cannot reproduce the issue with our latest version (2012.1.215), because we have made some improvements in validation mechanism?Kind regards,
the Telerik team
I saved you the trouble and downloaded the latst 2 version. Version 2011.2.0920.35 seems to resolve the problem. When I tried the same code with version 2012.1.0215.Trial, the binding failed.
Are you aware of any issues with the latest build?
You said: ". . . because we have made some improvements in validation mechanism".
Could you possibly describe the improvements that you made reference to?
We just swapped out 2011 Q3 libraries for the 2012 Q2 set and now were experiencing infinite looping through our IDataErrorInfo implementation code and your code. The result is the app freezes. This only happens with ValidatesOnDataErrors="InViewMode".
Could you send us a sample project which reproduces the problem? You need to open a support ticket in order to attach file. We will debug it and will assist you further.
Also, you can try whether the issue occurs with our latest official version - Q2 2012 SP1.
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
Thanks very much for the offer of assistance.
We've spent the better part of two days trying unsuccessfully to create a a compact sample project for a ticket that we already have open. Something about the interactions of the multitude of components, ours and yours, is causing our problems.
I was asking just for information so that we might be able to start looking in the right spot.
Follow up: It turned out that I was trying to build the sample project with the 2012 Q1 code and it does not happen there. When we went to the 2102 Q2 0725 Hotfix code we were able to recreate the problem scenario easily. We also saw an issue where the IDataErrorInfo implementation error messages were being duplicated (we get two of each message) in the GridViewBoundColumnBase.GetValidationErrors() method. We are pursuing that through a support ticket.
I am using RAD Controls (Version: 2010.3.1317.35).I am getting the redborder when i load the page in disabled mode.Please help me to remove the border.