Search the web
Sign In
New User? Sign Up
ydn-javascript · Yahoo! User Interface Library Group
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Click here for the latest updates on Groups Message search

Messages

  Messages Help
Advanced
DataTable cell selection   Topic List   < Prev Topic  |  Next Topic >
Reply < Prev Message  | 
Hi
when i select a cell in a table i would like to return the column key
of the column the cell is in and use it as a parameter for a call to a
javascript function e.g.

this.myDataTable.subscribe("cellClickEvent",function(columnKey));

can anybody advise me as to how i can retrieve the columnKey when a
cell is clicked?

Thanks
David




Thu Mar 27, 2008 4:40 pm

david_c1986
Offline Offline
Send Email Send Email

< Prev Message  | 
Expand Messages Author Sort by Date

Hi when i select a cell in a table i would like to return the column key of the column the cell is in and use it as a parameter for a call to a javascript...
david_c1986
Offline Send Email
Mar 27, 2008
4:40 pm

1. make your table subscribing to cellClickEvent. [ something like myTable.subscribe("cellClickEvent", myHandler); 2. in your event handler, check the event...
lou_tribal
Offline Send Email
Mar 27, 2008
4:56 pm

Hi ive done step 1 and i understand step 3 but i am unsure how to return the columnID, what do you mean by return the event target and get the column id from...
david_c1986
Offline Send Email
Mar 28, 2008
8:47 am

Your event handler will receive the event that was triggered, your function will be something like myHandler(event). On the event, get the target, this will...
lou_tribal
Offline Send Email
Mar 29, 2008
12:30 am

this.myDataTable.subscribe("cellClickEvent",function(oAgs) { var target = oArgs.target; var column = this.getColumn(target); alert(column.key); }); ... From:...
Satyam
satyamutsa
Offline Send Email
Apr 4, 2008
9:59 pm
Advanced

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help