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

Enable / Disable Save Changes Button in client side

1 Answer 300 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sambathraj
Top achievements
Rank 1
Sambathraj asked on 05 Mar 2014, 12:28 AM
Hi,
I would like to disable the save changes button in the client side and enable it only if some changes has been made in the Rad Grid. I am using the Rad Grid in batch edit mode. How can we do this?
Thanks
Sambath

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 07 Mar 2014, 12:33 PM
Hi Sambathraj,

You can use the following approach:
<ClientSettings>
    <ClientEvents OnCommand="gridCommand" />
</ClientSettings>
JavaScript:
function gridCommand(sender, args) {
    if (args.get_commandName() == "BatchEdit") {
        changesString = sender.get_batchEditingManager()._extractChangesString(args.get_tableView());
        if (changesString.length == 0) {
            args.set_cancel(true);
        }
    }
}

Hope this helps. Please give it a try and let me know about the result.

Regards,
Eyup
Telerik

DevCraft Q1'14 is here! Join the free online conference to see how this release solves your top-5 .NET challenges. Reserve your seat now!

Tags
Grid
Asked by
Sambathraj
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or