Forum
Topic RSS
07:26
28/10/2009
Offlinehi
i have been looking at http://www.secondpersonplural......m for examples on jqgrid. there is an example that i am interested in following on navigator, but cannot get the search(find) function to work. in the code,
jQuery("#tbleditable").navGrid('#pcustbut',{edit:false,add:false,del:false})
.navButtonAdd('#pcustbut',{caption:"Edit",
onClickButton:function(){
var gsr = jQuery("#custbut").getGridParam('selrow');
if(gsr){
jQuery("#custbut").GridToForm(gsr,"#order");
} else {
alert("Please select Row")
}
}
});
what do the #pcustbut and #order relate to? for example, in the code i have, do they relate to list2 and pager2?
<table id="list2" class="scroll" cellpadding="0" cellspacing="0"></table>
<div id="pager2" class="scroll" style="text-align:left;"></div>
also, the search button is appearing on the grid, but when i press it does not find anything. do i need a php page to collect data? if so, is there a code example somewhere? many thanks
Wish i knew more about jqGrid
08:00
The first parameter to navButtonAdd is the ID of pager, e.g. in your case "#pager2". The second parameter was just taken out of context from the example, in reality, you just do not need it. For example this is how you can have a "Toggle Filtering ToolBar" button in your toolbar
.navGrid('#pager2',{edit:false,add:false,del:false,search:false,refresh:false}) .navButtonAdd("#pager2",{caption:"Toggle",title:"Toggle Search Toolbar", buttonicon :'ui-icon-pin-s', onClickButton:function(){ mygrid[0].toggleToolbar() } })
There is a PDF help file in the Download section of this site, please download and open it and check out the "Custom Buttons" section.
Rumen Stankov
Trirand
Most Users Ever Online: 994
Currently Online:
40 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
Log In
Home