List Info

Thread: Re: DataTable cell selection




Re: DataTable cell selection
country flaguser name
United States
2008-03-28 03:47:28

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-javascriptyahoogroups.com, "lou_tribal"; <lou_tribal...>
wrote:
&gt;
> 1. make your table subscribing to cellClickEvent.
>; [ something like myTable.subscribe(&quot;cellClickEvent&quot;, 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).
>
> &lt;
>
> --- In ydn-javascript%40yahoogroups.com">ydn-javascriptyahoogroups.com, "david_c1986&quot; <david_c1986>
&gt; wrote:
&gt; >
>; > 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(&quot;cellClickEvent";,function(columnKey));
> >
> > can anybody advise me as to how i can retrieve the columnKey when a
> > cell is clicked?
> >
> > Thanks
&gt; > David
&gt; >
>;

__._,_.___
.

__,_._,___
Re: DataTable cell selection
country flaguser name
United States
2008-03-28 19:30:54

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).

&lt;

--- In ydn-javascript%40yahoogroups.com">ydn-javascriptyahoogroups.com, "david_c1986&quot; <david_c1986...>
wrote:
&gt;
> Hi
> ive done step 1 and i understand step 3 but i am unsure how to return
&gt; 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
&gt;
> --- In ydn-javascript%40yahoogroups.com">ydn-javascriptyahoogroups.com, "lou_tribal"; <lou_tribal>
&gt; wrote:
&gt; >
>; > 1. make your table subscribing to cellClickEvent.
>; > [ something like myTable.subscribe(&quot;cellClickEvent&quot;, 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).
> >
> > &lt;
> >
> > --- In ydn-javascript%40yahoogroups.com">ydn-javascriptyahoogroups.com, "david_c1986&quot; <david_c1986>
&gt; > wrote:
&gt; > >
>; > > 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(&quot;cellClickEvent";,function(columnKey));
> > >
> > > can anybody advise me as to how i can retrieve the columnKey when a
> > > cell is clicked?
> > >
> > > Thanks
&gt; > > David
&gt; > >
>; >
>;

__._,_.___
.

__,_._,___
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )