Forum


11:41

05/10/2008

Tony,
I looked in the docs, demos and forums and didn't see a clear cut way to setup an onclick event for an individual cell that would allow me to perform some action such as navigate to another window.
Using FireFox I manually edited the html to add an onclick handler to a cell just to see what would happen but it killed other functionality like multiselect
Thanks...
13:04

Moderators
30/10/2007

Hello,
Sorry that the docs are not ready jet, but there is a new event
onCellSelect(rowid, iCol, v) which fires when you click on cell (if defined)
rowid is the id of the row
iCol is the index of the column
v is the value
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:06

Moderators
30/10/2007

Hello,
Thank you for the recommendation
This is one of common thinks that I have discussed with a Reg. We both agree that this is needed, but as you known this requiere a lot of time and work. ( We boot have another engagements)
We must make a common decision about the future
development of jqGrid.
I think that everybody will be happy.
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.
Code example of linking to a page from a cell inside a grid. This links to a Cold Fusion page and passes a key value.
onCellSelect: function(rowid,iCol,cellcontent){
if (iCol == 1) // link on this column using its data
{
window.location.href = "casedetails.cfm?cid="+cellcontent;
}
if (iCol == 3) // link on this column using its data
{
window.location.href = "sitedetails.cfm?sid="+cellcontent;
}
},
Note: I tried using the new colmodel formatter property but it broke my subgrid functionality. I'm sure that Tony will fix that in future releases. Until then this will get the job done.
Most Users Ever Online: 715
Currently Online:
49 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