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

Grid Inline Editing and Paging Is Completely Broken

5 Answers 76 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dustin
Top achievements
Rank 1
Dustin asked on 01 May 2015, 02:57 PM

When a grid is setup with inline editing and paging, adding or editing a record and changing the current page WITHOUT clicking the Inline 'Update' or 'Cancel' buttons results in the data being updated within the datasource (as demonstrated by the 'change' event on the datasource being triggered) but without the correct operation. The 'cancel' and 'save' event on the grid are also not triggered.

 

This behavior is demonstrated by the following:

http://dojo.telerik.com/@djones/uKIjI/2

5 Answers, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 05 May 2015, 08:00 AM

Hello Dustin,

Here is an example showing how to implement Kendo UI Grid CRUD operations using the local data, that I believe will be helpful:

http://docs.telerik.com/kendo-ui/web/grid/how-to/grid-localstorage-crud

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Dustin
Top achievements
Rank 1
answered on 05 May 2015, 05:04 PM

That example is irrelevant, it's using both incell editing and batch editing, neither of which my are use cases in my example.

My example is utilizing static data for simplicity, however my real use case is setup with services, both experience the same issue as stated in my original post.

0
Kiril Nikolov
Telerik team
answered on 07 May 2015, 06:34 AM

Hello Dustin,

The edit mode is not relevant in this case. Both the create and update options arguments expect the updated data to be returned to the grid (same demonstrated in the linked example), while in your scenario you return just an empty array.

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Dustin
Top achievements
Rank 1
answered on 07 May 2015, 01:34 PM

Again, my example is just an example, and not intended to be the complete setup for production use.

If you run my example and watch the console output, you will note that the DataSource.Transport.Create and DataSource.Transport.Update methods are NEVER called with the below reproduction steps (they would be logged in the console output). So my previous statement still stands that your example is irrelevant, as the Create and Update methods never even used, regardless of the correctness of their usage in this example.

 

Reproduction steps:

  1. Run the page.
  2. Click the "Add new record button".
  3. Add some text to the newly created item (or don't, it doesn't really matter).
  4. DO NOT CLICK THE "Cancel" OR "Update" BUTTONS.
  5. Click the "Go to the next page" button.
  6. Note that the ONLY event triggered is the datasource change event with an undefined action. This is demonstrated by the console output "called datasource 'change' with 'undefined'".
  7. Click the "Go to the previous page" button.
  8. Note that the newly added (but not explicitly Cancelled or Updated) record still exists in the grid, and is no longer in Edit mode.
0
Kiril Nikolov
Telerik team
answered on 11 May 2015, 07:15 AM

Hello Dustin,

This behavior is expected, as when you click the "Add new record" button and observable object is added to the dataSource array. This object will update when the grid fields are updated, and when you navigate to another page it is still kept in the dataSource current array. However if you call the read() method of the dataSource without actually saving the object, you will no longer see it in the grid. 

Regards,
Kiril Nikolov
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
Dustin
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Dustin
Top achievements
Rank 1
Share this question
or