Hi i have a grid bound to a datasource that support iDataErrorInfo
however whenever I turn on the
e.Layout.Override.SupportDataErrorInfo to cells or rows or rowsandcells
the grid performance becomes sluggish
restoring to SupportDataErrorInfo.None solves the problem, but i don't have the little red things anymore (naturally)
Each row has about 10 validation rules, simple ones, like not null or greater than 0
I am using net 2010.1 version 10.1.20101.1007
Hi Fred,
I can't be 100% certain of this without seeing the code and trying it out, and maybe running a performance profile. But applying an image to a cell is a very common thing and I know it's very efficient in the grid. So the only part of this that might be inefficient is determining whether there is an error or not.
If you want to whip up a small sample project demonstrating the performance problem, we would be happy to take a look at it and see if it's the grid or something else causing it.
I am using the Entities generated with CodeSmith and NetTiers.
It is possible that there are not efficient.
I would have to look into that. If you tell me the problem is not on your end.. I will have to try and figure out more of the entities on my end I guess.
Who implemented the IDataErrorInfo interface? Is this a custom implementation of your own, or are you using a DataSet or some other data source?
The only reason I can think of why SupportsDataErrorInfo would slow the grid down is if your implementation of the interface is inefficient. For example, if you perform the validation on the data every time the IDataErrorInfo.Error property is accessed, then that would be a problem since the grid is going to hit this property quite a lot.
I'm pretty sure that the DataSet/DataTable implementation of this interface only performs validations when the data changes, and then it caches the error information so that when someone asks for the Error property, it's not doing anything but returning a string.