Hi. After insert a register on my table mysql, I want select that, but don’t work. My code is:
$(‘#lstAlumnos’).trigger(‘reloadGrid’, [{current:true}]);
setTimeout(function(){
$(“#lstAlumnos”).jqGrid(‘setSelection’, dni );
$(“#lstAlumnos”).jqGrid(‘getGridParam’, ‘selrow’).focus();
}, 500);
The line :
$(“#lstAlumnos”).jqGrid(‘getGridParam’, ‘selrow’).focus();
Show error in the console, its says: Encaught TypeError: $(…).jqGrid(…) is null.
I use @version 2.6.3 build 20190926-0831
Thank you very much.
Hi, I delete the line with error, but now select the new line in the grid sometimes. The gris is sorted by name. I dont know what is the problem. Thanks for your help!!!
This is default behavior to select newly added row. The newly added row should be there in the list. If you sort by ID descending and new record will always comes on top and show highlighted.