Forum
16:13
28/09/2009
hello,
i'm newbie in jqGrid. i use 3.5.3 version.
i got strange result after applying config.js
in any navGrid config case it's duplicating all buttons so
resulting html looks like
<table class=”ui-pg-table navtable” …
<table class=”ui-pg-table navtable” …
what's wrong?
—— config.js ———–
jQuery(document).ready(function(){
jQuery("#list").jqGrid({
url:'/adm/alerts/list',
editurl:'/adm/alerts/list',
datatype: 'json',
mtype: 'GET',
colNames:['Id','Creation Data','Email','Query','Location','Validated','Interval','Sent Email'],
colModel :[
{name:'id', index:'id'},
{name:'created', index:'created'},
{name:'email', index:'email', editable:true, edittype:'text'},
{name:'query', index:'query', editable:true},
{name:'location', index:'location', editable:true},
{name:'status', index:'status', editable:true, edittype:"select", editoptions:{value:"VALIDATED:VALIDATED;NOT VALIDATED:NOT VALIDATED"}},
{name:'interval', index:'interval', editable:true, edittype:"select", editoptions:{value:"DAILY AILY;WEEKLY:WEEKLY;MONTHLY:MONTHLY"}},
{name:'last_check', index:'last_check', editable:true}
],
ondblClickRow: function(id) {
if (id && id != lastSel) {
jQuery("#list").restoreRow(lastSel);
jQuery("#list").editRow(id, true);
lastSel = id;
}
},
pager: '#pager',
rowNum:20,
autowidth:true,
editCell:true,
rowList:[10,20,30],
sortname: 'id',
sortorder: 'desc',
viewrecords: true,
caption: 'Browse Alerts'
}).navGrid();
});
---------------------
12:05
Moderators
30/10/2007
Hello,
To navGrid should be passed some parameters
See docs
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.
12:48
28/09/2009
Of course I used it with various parameters but it doesen't affect. The same result. Duplicating.
For an instance last time i've tried this one config.
.navGrid('#pager',{edit:false,add:false,del:false,refresh:false,searchtext:"Find"})
.navButtonAdd('#pager',{
caption:"Add", buttonimg:"themes/basic/images/row_add.gif", onClickButton: function(){ alert("Adding Row")}, position:"last"
}).navButtonAdd('#pager',{
caption:"Del", buttonimg:"themes/basic/images/row_del.gif", onClickButton: function(id){ alert("Deleting Row: "+id)}, position:"last"
});
14:56
01/09/2008
I had a similar issue that I worked around by using code similar to this:
if($('#empControlLocspager').find('table').length==2) // skip if already present
$('#empControlLocs').navGrid('#empControlLocspager',{ edit:false,add:false,del:false,search:false })
.navButtonAdd('#empControlLocspager',{ caption:"Add", buttonimg:"stylesheets/themes/basic/images/row_add.gif", onClickButton: function(){ addEmptyRow($('#empControlLocs'))} , position:"last" })
.navButtonAdd('#empControlLocspager',{ caption:"Del", buttonimg:"stylesheets/themes/basic/images/row_delete.gif", onClickButton: function(){ deleteRow($('#empControlLocs'),lastsel)}, position:"last" })
.navButtonAdd('#empControlLocspager',{ caption:"Save", buttonimg:"stylesheets/themes/basic/images/save.gif", onClickButton: function(){saveGridRecord($('#empControlLocs'),lastsel, editURL)}, position:"last" });
Basically I just checked to see if the table containing the pager existed and skipped building it
HTH,
Pete
03:37
Moderators
30/10/2007
Hello,
Could you please send me a link to the problem?
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:
31 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