View Full Version : Can you identify the column that was clicked on

26 Aug 2009, 3:34 PM
I'm using the Column Tree and need to know which column within the row the user clicks on. Is that possible?

26 Aug 2009, 6:20 PM
Have you dumped out (into Firebug) the 'arguments' sent to the click event?

fn: function(){
scope: this

27 Aug 2009, 7:02 AM
I actually haven't dumped all the arguments, but I have taken a look at the node, and event objects. It seems very good at identifying the row, probably because extjs puts an id on that <div tag. But as near as I can tell:
A) the columns within the rows do not have any id's on them
B) the column isn't present in the node or event object

I have thought about just putting something like this the column that I want to identify:
<span id=mycolumn$rowid>img</span> and listening for a click on it, or puttting an onclick right in the code. I was trying to avoid all of that as I wasn't sure that extjs didn't have the ability to do that already.

27 Aug 2009, 7:06 AM
The reason I said 'dump the arguments' is to see exactly what that event is passing along. For instance, the RowSelection class of a Grid object, in it's click event, will pass the record, the column clicked, the row index, and a reference to the data store. Not knowing much about the ColumnTree (it's a user extension, right?) it's hard to tell.

27 Aug 2009, 7:13 AM
yeah, its a user extension, I think if I would have used something other than ColumnUI, like one of the grids, this would be a snap. BTW, the arguments have the node, the event, and a bunch of undefineds....So either I switch the UI Object I'm using, or I brute force it.

Thanks for the input,