This is a migrated thread and some comments may be shown as answers.
Trigger editRow() by click
0 Answers 50 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Alex
Top achievements
Rank 1
Alex asked on 05 Nov 2010, 06:19 AM
Hello, I want to move the Edit and Delete commands to the top of the grid so I don't have to have one per row. I want the user to select a row then click Edit button at the top to fire the editRow() event.

UPDATE:

Here is the solution I came up with, adding two Client-side events to the grid:

function editSelected(e) {
    e.preventDefault();
    var selectedRow = $(".t-master-row.t-state-selected");
    $("#ClientGrid").data("tGrid").editRow(selectedRow);
}
 
function onRowSelected(e) {
    $("#Edit").unbind('click');
    $("#Edit").click(editSelected);
}

Thanks.
Tags
Grid
Asked by
Alex
Top achievements
Rank 1
Share this question
or