I am using xamgrid
In the metadata.cs I have decorated the attributes with [Required]/ [StringLength()] validations
The xamgrid shows the validations correctly, but the user is still able to go to the next row, how can i prevent that,
Hi,
XamGrid should only display the warnings when in edit mode. If the warnings appear while in edit mode, it won't let you exit edit mode.
-SteveZ
I am able to exit the edit mode
When i am in edit mode again it shows error
It does not work as you suggested, any pointers what could be wrong?
Attached is the dummy code as original source has db that has many fields
You can create db with fields Id, State, CityName, detailsid1
I have the cityname with [StringLength()] validation
Also can you tell how it would be to add row and get the row added to the grid (related to post http://blogs.infragistics.com/forums/t/54043.aspx)
Thanks for the help in advance
I was able to reproduce the issue that you describe in our latest builds. I opened a case for you (Case number: CAS-63594-G4CRC2, Development work item: #49948) so you can be notified when there is a resolution.
Regards
Thanks for the reply
Is there any workaround currently for this issue?
To get around this, basically, you'd need to try and trigger the validation, every time an invalid value tries to get set on your object, not just the first time.
There are almost 7-10 fields which use the defaultvalidations like required/range/stringlength
Any advise, for the workaround to work should I write own validator. It works fine if I use normal datagrid
I am using xamgrid for additional features like deferredscrolling and all.
Yea, so since you're using the default validation for Ria, you're not going to be able to work around it. You'd really only be able to workaround it if you implemented the validation interfaces on your data object yourself.
Thanks Stephen
What will be the change in the code, The validation used is the default validation
i.e [StringLength(4)] public string CityName { get; set; } in the metadata.cs
Where should i try to revalidate ?
Sorry if I have not understood
Where else will the change