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

update "dirty" property manually

3 Answers 406 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Bilal
Top achievements
Rank 2
Bilal asked on 25 Feb 2015, 06:13 PM
Hi,

I have the following case:

I send batch records to server. Some of them get updated and others don't.

For the successfully updated rows, I want to commit changes on data source so that "dirty" is false.

While the others with errors, I will show the errors on Grid.

The problem is, can I update "dirty" for specific records? Also, is it enough to update this property to let data source know that the record updated has no more changes and committed?

Thanks

3 Answers, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 27 Feb 2015, 11:38 AM
Hi Bilal,

Yes, setting the dirty field to false is enough for the DataSource to exclude the item from the next Update request, unless the item is newly added. I would also suggest checking the pushUpdate and pushCreate methods.

Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Bilal
Top achievements
Rank 2
answered on 27 Feb 2015, 03:21 PM
Thanks Alex for the information. In fact, I thought of using pushUpdate and pushCreate, as they do silent add/update without having to submit changes later to server, however, that failed with me. Check this post here:

http://www.telerik.com/forums/batch-update---error-reporting-from-server

Thanks
0
Alexander Popov
Telerik team
answered on 03 Mar 2015, 09:48 AM
Hello Bilal,

I see that my colleagues have already addressed your questions in the thread you mentioned. I would kindly ask you to keep related questions in single support ticket or forum thread - this makes it easier to follow and avoids duplicate effort on our side.

Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Data Source
Asked by
Bilal
Top achievements
Rank 2
Answers by
Alexander Popov
Telerik team
Bilal
Top achievements
Rank 2
Share this question
or