Forum
09:17
23/02/2010
I enabled multiselect in the TreeGrid and haven't found an issue yet so I thought I'd share the thing I did.
In the grid.base.js find:
try { $(this).jqGrid("setTreeGrid");} catch (_) {}
if(ts.p.datatype != "local") { ts.p.localReader = {id: "_id_"}; }
}
Then move the part just below it of multiselect above this tree grid section so it looks like:
this.p.colNames.unshift("<input role='checkbox' id='cb_"+this.p.id+"' class='cbox' type='checkbox'/>");
this.p.colModel.unshift({name:'cb',width:isSafari ? ts.p.multiselectWidth+ts.p.cellLayout : ts.p.multiselectWidth,sortable:false,resizable:false,hidedlg:true,search:false,align:'center',fixed:true});
}
if(this.p.treeGrid === true) {
try { $(this).jqGrid("setTreeGrid");} catch (_) {}
if(ts.p.datatype != "local") { ts.p.localReader = {id: "_id_"}; }
}
Then you just niet to remove the disabling of the multiselect in the setTreegrid method of grid.treegrid.js:
return this.each(function (){
var $t = this, i=0, pico;
if(!$t.p.treeGrid) { return; }
if(!$t.p.treedatatype ) { $.extend($t.p,{treedatatype: $t.p.datatype}); }
$t.p.subGrid = false; $t.p.altRows =false;
$t.p.pgbuttons = false; $t.p.pginput = false;
// re-enable multiselect $t.p.multiselect = false;
$t.p.rowList = [];
Please also let me know if you do happen to run into issues.
Most Users Ever Online: 715
Currently Online:
39 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