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 give you the cell that was
clicked.
If you look at the field provided by that target you will see that you
have access to a columnId field that contains the id of the column the
cell belongs to.
I do not have my code in hands right now but I will try to send you
and example a bit later).
<
--- In ydn-javascript%40yahoogroups.com">ydn-javascript
yahoogroups.com, "david_c1986" <david_c1986
...>
wrote:
>
> 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 it? could you provide an example please?
> sorry im new to this
> Thanks
> David
>
> --- In ydn-javascript%40yahoogroups.com">ydn-javascript
yahoogroups.com, "lou_tribal" <lou_tribal
>
> wrote:
> >
> > 1. make your table subscribing to cellClickEvent.
> > [ something like myTable.subscribe("cellClickEvent", myHandler);
> >
> > 2. in your event handler, check the event target and retrieve the
> > column id from it.
> >
> > 3. get the column from this id (check the API for the getColumn
method).
> >
> > <
> >
> > --- In ydn-javascript%40yahoogroups.com">ydn-javascript
yahoogroups.com, "david_c1986" <david_c1986
>
> > wrote:
> > >
> > > 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
> > >
> >
>
.