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

Make grid buttons stateful

2 Answers 86 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Christopher
Top achievements
Rank 1
Christopher asked on 28 Aug 2012, 12:58 AM
Hi,

Is there a way make the Save Changes, Cancel Changes buttons have state so they are only enabled when changes have been made?

Thanks

Chris



2 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 28 Aug 2012, 10:44 AM
Hi Chris,

Please disable the buttons after Grid initialization, and then use the Grid's save event to check whether there are dirty marks in the table (the red marks - span.k-dirty ) to re-enable the buttons. You will need setTimeout for the check, because the event is fired before the dirty mark is injected in the respective table cell.

If you need further assistance, please open a support ticket.

Kind regards,
Dimo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Christopher
Top achievements
Rank 1
answered on 30 Aug 2012, 01:16 AM
Thank you. In the end I did this by looking at the datasource data (isDirty property) on the change event

Tags
Grid
Asked by
Christopher
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Christopher
Top achievements
Rank 1
Share this question
or