Forum
11:21
Moderators
30/10/2007
Hello,
Please the code example or the best is to provide a link to the problem
Thank you
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.
14:19
06/08/2010
Hi Tony,
below the requested code. I could provide more info if required.
Thanks!
.tel
var mygrid = jQuery("#list1").jqGrid({
sortable : true,
url: '<?php print $session->link("/table/javascripts/table_div_json.php","country=");?>'+country,
datatype: "json",
mtype: 'POST',
colNames:['ID','Name','Last Login','Country','Active','Time Zone','Local Format','First','Last','Email'],
colModel : [
{name : 'id', index : 'id', width : 40, sorttype : 'int', align: 'center',title : 'false'},
{name : 'name', index : 'name', width : 80, sorttype : 'text', align: 'left',title : 'false'},
{name : 'lastlogin', index : 'lastlogin', width : 80, sorttype : 'date', align: 'left',title : 'false',hidden:'true'},
{name : 'country', index : 'country', width : 80, align: 'left', formatter:exampleFormatter,title : 'false'},
{name : 'user_active', index : 'user_active', width : 80, align: 'right',title : 'false',hidden:'true'},
{name : 'timezone', index : 'timezone', width : 80, align: 'right',title : 'false'},
{name : 'number_format', index : 'number_format', width : 80, align: 'right',title : 'false'},
{name : 'firstname', index : 'firstname', width : 80, align: 'right',title : 'false'},
{name : 'lastname', index : 'lastname', width : 80, align: 'right',title : 'false'},
{name : 'email', index : 'email', width : 80, align: 'right' ,title : 'false'}
],
pager: '#pager',
hoverrows : false,
rowNum:30,
rowList:[10,15,20,25,30],
gridview : true,
rownumbers: true,
height: 'auto',
autowidth : true,
forceFit : true,
sortname: 'id',
viewrecords: true,
sortorder: "desc",
caption: 'USER LIST',
loadComplete: function()
{
jQuery('.tooltip').cluetip({closePosition: 'title', ajaxCache: false, width: '600px', height :'auto',
hoverIntent: { sensitivity: 1, interval: 500, timeout: 500 }
});
},
onCellSelect: function(id,iCol,cellvalue){
var cm = jQuery('#list1').jqGrid('getGridParam', 'colModel');
var colName = cm[iCol];
if(colName['index']!='id')
return false;
var ret= jQuery("#list1").jqGrid('getRowData',id);
var box_div = document.getElementById('box_background');
box_div.style.display ='block';
var mydiv = document.getElementById('box_centered');
mydiv.style.display ='block';
// ajax requests .... etc.
},
onHeaderClick: function (stat) {
if(stat == 'visible' ){
jQuery("#filter").css("display","none");
}}
});
etc...
Most Users Ever Online: 715
Currently Online:
23 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