jquery - jqgrid: I would like to auto select the cell my mouse is currently hovering over -
know may odd question. how auto select cell in jqgrid mouse hovering over? reason is, not sure how accomplish custom deletion of row without cell being selected first.
currently have:
jqgrid code snippet:
gridcomplete: function(){ var ids = jquery("#breed_list").jqgrid('getdataids'); for(var i=0;i < ids.length;i++) { var cl = ids[i]; ed = "<img src=\"../images/edit.png\" alt=\"edit\" onclick=\"jquery('#breed_list').editrow('"+cl+"');\" />"; de = "<img class=\"del_row\" src=\"../images/delete.png\" alt=\"delete\" />"; ce = "<input class=\"del_row\" type='button' onclick=\"deleterow()\" />"; jquery("#breed_list").jqgrid('setrowdata',ids[i],{act:ed+de+ce}); } $(this).mouseover(function() { //do code }); },
problem:
function not execute when click button without cell selected. if select cell click button deleterow() function execute.
possible solution?:
idea auto select cell mouse currenatly hovering when user click button function execute properly. other ideas welcome :-)
edit
working code:
idea of auto select cell rather simple jquery.
code:
$(this).mouseover(function() { var valid = $(".ui-state-hover").attr("id"); jquery("#breed_list").setselection(valid, false); //alert(valid); });
-rich
working code:
idea of auto select cell rather simple jquery.
code:
$(this).mouseover(function() { var valid = $(".ui-state-hover").attr("id"); jquery("#breed_list").setselection(valid, false); //alert(valid); });
Comments
Post a Comment