1
ParamQuery Pro Evaluation Support / SetSelection does not work
« on: July 08, 2014, 08:21:29 am »
When I try to set the selection nothing happens. The same line works in the console after the grid has already loaded, but whether I put the setSelection call after or before the grid initializing it still does not work. The grid is being loaded via an ajax call so i tried to bind to the load event but it still does not work.
Does the grid not allow you to set the selection if you are loading via ajax? I have tried in the load event
And also binding to the load event like this. No matter what I try it doesn't set the selected row but again if I run the same code through the console it will select the row so I know the syntax and data is correct it just appears to be an issue with grid itself unless I am missing something but I have tried almost everything I can think of at this point.
Code: [Select]
obj.create = function (evt, ui) {
$("#grid_editing").pqGrid("setSelection", { rowIndx: 1 });
}
var $grid = $('#grid_editing').pqGrid(obj);
Does the grid not allow you to set the selection if you are loading via ajax? I have tried in the load event
Code: [Select]
load: function(event, ui) {
$('#grid_editing').pqGrid('setSelection', { rowIndx: 1 });
},
And also binding to the load event like this. No matter what I try it doesn't set the selected row but again if I run the same code through the console it will select the row so I know the syntax and data is correct it just appears to be an issue with grid itself unless I am missing something but I have tried almost everything I can think of at this point.
Code: [Select]
$( "#grid_editing" ).on( "pqgridload", function( event, ui ) {$('#grid_editing').pqGrid('setSelection', { rowIndx: 1 });} );