Forum
10:05
I have gridComplete to put:
$("#sole_grid_table").jqGrid('setSelection',id,false);
to wanted rows after loading. It works fine.
but when I do sorting, grid removes selected rows and gridComplete don't fire.
onSortCol fires, but it fires before sorting, so it's too early.
am I doing something wrong? or is there an bug?
http://www.trirand.com/jqgridw..... : "gridComplete ... This fires after ... and after sorting paging and etc."
15:11
Moderators
30/10/2007
Hello,
Thanks. Could you please post the entry grid configuration?
If you put alert in gridComplete - what is happen?
Is your sorting loacal or server side?
Also we need the entrygrid configuration and other code related to it
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
00:44
Hi Tony,
First of all congratulations on this fantastic grid.
I am having similar problem. can you tell me if i am doing something wrong i am using java spring/jsp? Also i want to get rid of all the pagenation stuff from this grid and dumpo all the records on to the page, i can do that but not able to get rid of the page 1 of 1 and the buttons associated.
-====-
jQuery(document).ready(function(){
var mystr = <%=request.getAttribute("myjsonstr")%>;
jQuery("#mygrd").jqGrid({
url:'loadProductSummary.do',
datatype: "jsonstring",
datastr: mystr,
colNames:['Rate ID','Region', 'Comment', 'Update By', 'Update Time'],
colModel:[ {name:'Rate ID',index:'Rate ID', width:80, sorttype:'int', editable:true, editoptions:{size:10}},
{name:'Region',index:'Region', width:80, editable:true, edittype:"select", editoptions:{value:nameSelect(),size:10}},
{name:'comment',index:'comment', width:250, editable:true, editoptions:{size:10}},
{name:'update_by',index:'update_by', width:100, sorttype:'float', editable:true, editoptions:{size:10}},
{name:'update_time',index:'update_time', width:100, sorttype:'date', editable:false, editoptions:{size:10}}
],
rowNum: 1000,
pager: '#pagernav',
sortname: 'Rate ID',
viewrecords: true,
sortorder: "asc",
shrinkToFit: false,
width: 1024,
height: 450,
caption:"Rates View",
editurl: "jsonServlet?action=edit",
onSortCol: function() {
alert('In the onSortCol');
jQuery("#ratematrix").setGridParam({datatype:'local'});
},
loadComplete: function () {
alert('In the loadComplete');
jQuery("#ratematrix").setGridParam({datatype:'json'});
},
gridComplete: function () {
alert('In the gridComplete');
jQuery("#ratematrix").setGridParam({datatype:'json'});
},
jsonReader : { root: "rows", page: "page", total: "total", records: "records", repeatitems: false, cell: "rows", id: "id"}
});
jQuery("#mygrd").jqGrid('navGrid','#pagernav',
{view:false, refresh:true, search:false}, //options
{checkOnSubmit : true, reloadAfterSubmit:false, closeOnEscape:true, bottominfo:"Fields marked with (*) are required",
afterShowForm: function(eparams) {
document.getElementById('Rate ID').disabled = true;
}
}, // edit options
{checkOnUpdate:true,checkOnSubmit : true, reloadAfterSubmit:true, closeOnEscape:true,bottominfo:"Fields marked with (*) are required",
afterShowForm: function(eparams) {
document.getElementById('Rate ID').disabled = true;
}
}, // add options
{reloadAfterSubmit:false,closeOnEscape:true}, // del options
{closeOnEscape:true}, // search options
{navkeys: [true,38,40], height:250,jqModal:false,closeOnEscape:true} // view options
);
});
</script>
<table id="mygrd" class="scroll"></table>
<div id="pagernav" class="scroll" style="text-align: center;"></div>
Best
- Shah
16:19
Moderators
30/10/2007
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
21:21
Thanks Tony,
my initial setting is datatype: "jsonstring"
I want local sort, however when i press refresh it should be json. the refresh works fine as long as i do not sort the grid. once i sort, the datatype is set to local and the sort works locally taht is what i want. but once the sort is done the locaComplete or gridcomplete does not fire. how do i change the datatype back to json for refresh?
onSortCol: function() {
// alert('In Sort');
jQuery("#ratematrix").setGridParam({datatype:'local'});
},
loadComplete: function () {
// alert('load Complete');
jQuery("#ratematrix").setGridParam({datatype:'json'});
},
gridComplete: function () {
// alert('gridComplete');
jQuery("#ratematrix").setGridParam({datatype:'json'});
},
13:02
Moderators
30/10/2007
Hello,
Thanks. Also I have fixed this - will publish the fix tomorrow in GitHub
Best Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
83 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66