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

Kendo UI Grid Batch Editing questions

1 Answer 98 Views
Grid
This is a migrated thread and some comments may be shown as answers.
J
Top achievements
Rank 1
J asked on 01 Sep 2017, 01:44 PM

Hello,

I require the following features and I'm wondering if they are supported in some way: 

1) Is it somehow possible to ask for a confirmation from  before saving records to the database? Like: "This will save your changes to the database. Are you sure?"

2) Does batch editing support dropdown boxes (like in Kendo UI for other platforms)?

3) Is it somehow possible to detect changes in the grid (a.k.a. dirty check)? I want to warn user when they have unsaved changes and want to leave the page. 

 

Thanks!!

1 Answer, 1 is accepted

Sort by
0
Alex Hajigeorgieva
Telerik team
answered on 06 Sep 2017, 07:48 AM
Hello J,

Thank you for trying out Kendo UI. Please find my comments to your questions below:

1) Is it somehow possible to ask for a confirmation from before saving records to the database? Like: "This will save your changes to the database. Are you sure?"

The easiest way to achieve that with the Kendo UI Grid is to have a custom command in the toolbar. When clicked, you can use the kendo.confirm() method which will generate a Kendo UI Confirm styled to match the current theme. The confirm has a done and fail handlers so you can sync() the data source if the user clicked ok or the grid saveChanges() method which will do the same internally.

I created a runnable example in a Dojo - just press the run button, make some changes and then click Save changes in the toolbar:

http://dojo.telerik.com/@bubblemaster/ajAtA

2) Does batch editing support dropdown boxes (like in Kendo UI for other platforms)?

One of our official demos demonstrated how to use a Kendo UI DropDown as a custom editor in a batch mode here:

http://demos.telerik.com/kendo-ui/grid/editing-custom

API reference for column editor: http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#configuration-columns.editor

3) Is it somehow possible to detect changes in the grid (a.k.a. dirty check)? I want to warn the user when they have unsaved changes and want to leave the page. 

We have dirty flags added to each cell which has had any changes made. You can also use the dataSource.hasChanges() method which will return a boolean.

Kind Regards,
Alex Hajigeorgieva
Progress Telerik
Try our brand new, jQuery-free Angular 2 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
J
Top achievements
Rank 1
Answers by
Alex Hajigeorgieva
Telerik team
Share this question
or