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

[Solved] Javascript Cancel Command?

1 Answer 121 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Emmanuel
Top achievements
Rank 1
Emmanuel asked on 03 Sep 2010, 05:10 PM
Hi.

I am making custom buttons outside the grid for update / edit / cancel.

I can effectively select a row and make it go in edit mode, as well as updating that row when the time comes.
The only thing left is canceling the edit mode on a row.
How would I do so?

This is how I currently edit and update a row and I need to do something similar for the cancel:

$('tr:has(td)', this).live('click', function (e) {
    var gridId = e.liveFired.id;
    var gridData = $("#" + gridId).data('tGrid');

    if(condition)
            gridData.editRow($(this));
    else if (condition)
            gridData.updateRow($(this));
    else if(condition)
            // PERFORM CANCEL HERE
});

Need some assistance with what I can call in javascript / jquery to cancel a row being edited.
Thanks

1 Answer, 1 is accepted

Sort by
0
Emmanuel
Top achievements
Rank 1
answered on 03 Sep 2010, 06:44 PM
Well it was simple enough in the end.

A simple
gridData.cancelRow($(this));
will work perfectly.

It was too obvious for me to even consider! =P
Tags
Grid
Asked by
Emmanuel
Top achievements
Rank 1
Answers by
Emmanuel
Top achievements
Rank 1
Share this question
or