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

Dynamic model and validation for Grid

1 Answer 64 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Tomáš
Top achievements
Rank 1
Tomáš asked on 13 Apr 2018, 12:44 PM

Hello!

I've got some problems with grid using dynamic model and model validation. I am working on app for viewing and updating sql tables. Everything works perfect except updating values. With dynamic model, I am not able to validate model like in microsoft documentation. ModelState.IsValid property is always false ... and that is a problem. (Edited cells in grid are marked as unsaved after update due to ModelState.IsValid == false). Could you help me ? 

Thx,

Tom

1 Answer, 1 is accepted

Sort by
0
Angel Petrov
Telerik team
answered on 18 Apr 2018, 10:27 AM
Hi Tom,

I am not sure about the exact implementation that the project has but the described behavior seems expected since dynamic models are used. Maybe you can check the object properties and manually validate things instead of using IsValid

If the above approach does not fit the scenario I would kindly like to ask you to explain it in detail. That would greatly facilitate us in providing a suggestion towards a solution.

Regards,
Angel Petrov
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Tomáš
Top achievements
Rank 1
Answers by
Angel Petrov
Telerik team
Share this question
or