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

Batch editing

7 Answers 98 Views
Grid
This is a migrated thread and some comments may be shown as answers.
axel
Top achievements
Rank 1
axel asked on 16 Sep 2013, 08:57 AM
Hi,

1. "cancel changes" also deletes saved records.
2. dirty flags disappear on "add new record" click without saving the edits

Kind regards
Axel

7 Answers, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 18 Sep 2013, 06:00 AM
Hello Axel,

To your questions: 
1. "cancel changes" also deletes saved records. - this could only happens if the DataSource haven't accepted the changes yet, i.e the item doesn't have `id` set or `Save Changes` is not clicked as in the demo.

2. dirty flags disappear on "add new record" click without saving the edits - yes, dirty flag is not persisted over grid refresh, which is what happens when you add new item.

Regards,
Nikolay Rusev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
axel
Top achievements
Rank 1
answered on 22 Sep 2013, 12:31 PM
Hi Nikolay

1. i didn't noticed, that the record was moved to the last page after "cancel changes". i would rather expect this behavior after clicking the save button. 

2. In my opinion, this confuses the user. Is there a way to suppress the flag?

thanks for your help
0
Nikolay Rusev
Telerik team
answered on 25 Sep 2013, 06:03 AM
Hello Axel,

1. i didn't noticed, that the record was moved to the last page after "cancel changes". i would rather expect this behavior after clicking the save button. - I'm not sure what you mean here. Which record is moved on the last page after changes get canceled?

2. In my opinion, this confuses the user. Is there a way to suppress the flag? - The only way to show the flag is to manually handle this scenario. Here is a sample for one way of handling this scenario - Preserve the dirty indicator in incell editing and client operations.

Regards,

Nikolay Rusev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
axel
Top achievements
Rank 1
answered on 26 Sep 2013, 01:46 PM
Hi Nikolay,

1. start "batch editing" demo.
    add a new record
    save changes
   click cancel changes
   record is now at the end of the list

2. Thank you....

Axel
   
0
Nikolay Rusev
Telerik team
answered on 27 Sep 2013, 02:30 PM
Hello Axel,

Ah, I see what you mean. This is indeed expected as once new items are accepted they are inserted in collection responsible for keeping track of the pristine item state. When you click the `Cancel changes` button all items are read from that `pristine` collection and the new items are always at the end.

Regards,
Nikolay Rusev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
axel
Top achievements
Rank 1
answered on 29 Sep 2013, 09:53 AM
okay, but I need the records in the order in which they are entered.
any ideas? otherwise "cancel changes" is useless for me.

Thanks again for your help
0
Nikolay Rusev
Telerik team
answered on 30 Sep 2013, 06:29 AM
Hello Axel,

I'm afraid that you cannot change the behavior of DataSource cancelChanges. The only way I can thing of is to manually handle the revert of DataSource.data changes based on some business logic.

Regards,
Nikolay Rusev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
axel
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
axel
Top achievements
Rank 1
Share this question
or