1
Help for ParamQuery Grid (free version) / Re: Focus on row when grid is popped up?
« on: May 25, 2017, 04:15:25 pm »
I figured something out:
Just add a timer to the button click event.
$("button#open_popup").button().click(function (evt) {
$("#popup")
.dialog({
height: 400,
width: 700,
modal: true,
open: function (evt, ui) {
$("#grid_popup").pqGrid(obj);
},
close: function () {
$("#grid_popup").pqGrid('destroy');
},
show: {
effect: "blind",
duration: 500
}
});
setTimeout(function () { $("#grid_popup").pqGrid("setSelection", { rowIndx: 0 }); }, 500);
}); // put .click(); at the end to show the list on page open.
Just add a timer to the button click event.
$("button#open_popup").button().click(function (evt) {
$("#popup")
.dialog({
height: 400,
width: 700,
modal: true,
open: function (evt, ui) {
$("#grid_popup").pqGrid(obj);
},
close: function () {
$("#grid_popup").pqGrid('destroy');
},
show: {
effect: "blind",
duration: 500
}
});
setTimeout(function () { $("#grid_popup").pqGrid("setSelection", { rowIndx: 0 }); }, 500);
}); // put .click(); at the end to show the list on page open.