I dont know why, but i have this problem. I have a grid in a modal window. What i want is, after i doubleclick a row, close window and focus a textbox in my main page. I dont know why, but if i do this by catching “enter” event in a row, it works ok and the textbox is focused. but if i do the same job “doubleclicking a row”, the textbox is not focused. Here is my code.
$('#popupClientes').on('close',function(event) { $('#txtNroAfiliado').focus(); }); $('#grdClientes').on('rowdoubleclick',function(event) { var args = event.args; var idxRow = args.rowindex; var rowData = $('#grdClientes').jqxGrid('getrowdata',idxRow); $('#txtCliente').val(rowData.Codigo); $('#popupClientes').jqxWindow('close'); }); $('#grdClientes').keydown(function(ev) { if (ev.which == 13) { var rowindex = $('#grdClientes').jqxGrid('getselectedrowindex'); var rowData = $('#grdClientes').jqxGrid('getrowdata',rowindex); $('#txtCliente').val(rowData.Codigo); $('#popupClientes').jqxWindow('close'); } });
see that im doing exactly the same in “doubleclick” event and in “enter” event. And the results are different.. thanks