Hi,
I am building a data entry screen using Kendo UI SPA. My users will do lot of data entry each day. So after filling in a form and pressing Save should save the records and again present them the same screen for data entry. How can I reset all the controls (or View Model) to initial state?
Thanks
I am building a data entry screen using Kendo UI SPA. My users will do lot of data entry each day. So after filling in a form and pressing Save should save the records and again present them the same screen for data entry. How can I reset all the controls (or View Model) to initial state?
Thanks
5 Answers, 1 is accepted
0
Hello Raja,
The observable object does not provide any way to reset its properties to its initial state, I am afraid you will need to manually set each of them:
http://docs.telerik.com/kendo-ui/api/framework/model#methods-set
I am sorry for any inconvenience caused.
Kind Regards,
Petur Subev
Telerik
The observable object does not provide any way to reset its properties to its initial state, I am afraid you will need to manually set each of them:
http://docs.telerik.com/kendo-ui/api/framework/model#methods-set
I am sorry for any inconvenience caused.
Kind Regards,
Petur Subev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Raja
Top achievements
Rank 1
answered on 09 Aug 2014, 12:53 AM
Thank you for the response. But I am facing a problem this way also. If I set the field to a specific value, control that is bound to that value is not effected. I thought the value binding is bi-directional. Can you help?
0
Hi Raja,
That's correct - the value binding is bi-directional. Can you reproduce the problem you are facing in the Dojo? We will take a look.
Regards,
Petyo
Telerik
That's correct - the value binding is bi-directional. Can you reproduce the problem you are facing in the Dojo? We will take a look.
Regards,
Petyo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Raja
Top achievements
Rank 1
answered on 13 Aug 2014, 04:28 PM
I think I found out what I am doing wrong. I have a model property "selectedValue" which I am trying to set from a function in the model like this which is not working.
Below piece of code seems to be working and changes the associated dropdown selection.
Thank you for your help.
model.selectedValue = 1;
Below piece of code seems to be working and changes the associated dropdown selection.
model.set(
"selectedValue"
,1);
Thank you for your help.
0
Hello,
this is correct, you should use the set method, as our documentation suggests in order for the bindings to update correctly.
Regards,
Petyo
Telerik
this is correct, you should use the set method, as our documentation suggests in order for the bindings to update correctly.
Regards,
Petyo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!