JqGrid: how to disable online editing of the entire grid?

advertisements

I have a grid. The first column is a checkbox for each row. The second column has two buttons for each row: edit and delete. Clicking on the edit button invokes inline editing. I simply want to disable inline editing for the all rows in the grid. I want to show a form when the edit button is clicked.

I am unable to find a decent answer to this question. I did find a few related posts at SO but they seem unclear to me.

Thanks and regards.


This is what I did, pretty ugly, but it works. My gut feel is that there must be better solution.

$(grid_selector).jqGrid({
....

                onSelectRow: function(id){
                    jQuery(grid_selector).restoreRow(id);
                        $('#jSaveButton_' + id).hide();
                        $('#jCancelButton_' + id).hide();
                        $('#jEditButton_' + id).show();
                        $('#jDeleteButton_' + id).show();
                },
....

});

Hope this helps someone. Still wait for better solution. But there is a problem with it, the edit button does not invoke a form anymore, which I will try to find a solution.