Forum
Topic RSS
Related Topics
00:00
10/08/2009
OfflineHi,
I find you question intresting and inplemented the corresponding solution which you can see live here. In the demo I follow the same way as in the current version of jqGrid and allow deselect the column if one selects it twice. So the behavior is the same like with rows. If you need another behavior you can easy modify my code.
The main parts of the code is following:
grid.jqGrid({
// … all parameters which you need
onCellSelect: function (rowid,iCol) {
var i, rows = this.rows, rl = rows.length, row, rowCells;
for(i=0; i<rl; i++) {
row = rows[i];
if($(row).hasClass('jqgrow')) {
rowCells = row.cells;
if (typeof selColumn !== "undefined") {
$(rowCells[selColumn]).removeClass("ui-state-highlight");
}
if (selColumn !== iCol) {
$(rowCells[iCol]).addClass("ui-state-highlight");
}
}
}
selColumn = selColumn !== iCol? iCol: undefined;
}
});
Best regards
Oleg
Most Users Ever Online: 994
Currently Online:
14 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