I'm facing a problem with jqGrid
and I don't know if has an easy solution.
When I click on a row for the first time the app slideUp
a header with information about the register, if I click again the app slideDown
this header. This work is coded in the onSelectRow
event of jqGrid
and is working right.
The problem comes after, when I double click in a row. In this case the app slideUp
all the content about the register with the header included. The behaviour which I want to prevent is the onSelectRow
because When the ondblclickRow
event is fired, the onSelectRow
event was fired two times before.
this is the piece of my code:
ondblClickRow: function(id) {
if (model.gisgridmap.context.id=="griddiv" && $(".editbt").length>0) {
if (model.selectedrow == id) {
$el.trigger("onUnselectRow");
$(this).find(".ui-state-highlight, [aria-selected='true']").removeClass('ui-state-highlight');
model.selectedrow = 0;
}
else{
$el.trigger("onSelectRow", id);
$(this).find('[aria-selected=true]').addClass('ui-state-highlight');
model.selectedrow = id;
pui.editForm(model);
}
},
onSelectRow: function(id,status,e){
if (model.selectedrow == id) {
$el.trigger("onUnselectRow");
$(this).find(".ui-state-highlight, [aria-selected='true']").removeClass('ui-state-highlight');
model.selectedrow = 0;
}
else{
$el.trigger("onSelectRow", id);
$(this).find('[aria-selected=true]').addClass('ui-state-highlight');
model.selectedrow = id;
}
}
Thanks in advance.