Microsoft's DataGrid control has a built-in System.Windows.Controls.ValidationSummary control which nicely displays the Errors list at the bottom of the Grid.
XamGrid doesn't seem to have built-in support for the ValidationSummary.
Is there a way to have XamGrid Errors displayed in a ValidationSummary control? If so, how?
I tried to reply yesterday but kept getting a Server too Busy when trying to enter the forums.
Anyway, just wanted to say thanks.
Joe
Hello jgreene274,
XamGrid does not provide build-in validation summary control.
You could use the MS ValidationSummary control and set it up to target XamGrid. For more details how to achive this you could check the following blog post out.
Few things that worth mentioning - Validation Summary walks through all controls withing some range(that would be xamGrid in your case) and inspects their bindings for validation errors. SO in order for validation summary control to be able to detect the validation errors XamGrid should have a cell/roll that is in edit mode, because when not in edit mode the bindings are one way and won't contain validation errors. In v. 11.2 we have release a feature that you could put certain types of columns to be always in edit mode(ComboBoxColumn, CheckBoxColumn and DateColumn).
Another thing is that XamGrid utilizes UI virtualization which means that Validation Summary would be able to collect binding errors only from the cells/rows that are currently in view and in edit mode.
Hope this helps,
Yes, I'm getting the red box around the invalid cell.
In addition to the Red box, Microsoft's DataGrid has built-in support for the ValidationSummary control, which shows a consolidated list of errors at the bottom of the grid.
Here's an example of how the ValidationSummary control appears (except for a DataGrid the ValidationSummary will appear at the bottom of the grid):
My question is: Does the XamGrid have built-in support for the ValidationSummary contro? If so, how to enable it? If not, do you (Infragistics) know a way to incorporate it within the XamGrid?
This sample of the ValidationSummary can be seen at:http://www.silverlight.net/content/samples/sl4/toolkitcontrolsamples/run/default.html
In the tree on the left select Validation then select the ValidationSummary tab.
I have been looking into your questions and I can suggest you check the following link from our sample browser:
http://samples.infragistics.com/sllob/RunSamples.aspx?cn=grid#/grid/idataerrorinfo
In the referenced sample is shown XamGrid bound to collection which implements IDataErrorInfo and if you try to edit some of the rows and you enter “Name” with length less than 5 you will notice an error message next to the cell.
Please let me know if you need any additional information on this matter or if I have misunderstood you in any way.