-
4 May 2011 2:33 AM #1
Grid column-header click-event
Grid column-header click-event
Hi there,
i tried to set the column-headers of a grid clickable, but gxt doesnt like me
.
I tried to catch the click-event in few different ways:
Code:final ColumnConfig column = new ColumnConfig(ID, NAME, WIDTH); column.addListener(Events.HeaderClick, new Listener<BaseEvent>() {I only want to catch a click-event (grid column header).Code:final ColumnConfig column = new ColumnConfig(ID, NAME, WIDTH); column.addListener(Events.OnClick, new Listener<BaseEvent>() {
Thanks for every help ;D
Greetings Daniel
-
5 May 2011 2:20 AM #2
You have to add the listener but to the "header" Widget, not to the column.
It would be something like the following code (I have not tested it, so maybe you have to try a little bit)
grid.getView().getHeader().getHead(numberOfTheColumn).addListener...
-
5 May 2011 2:47 AM #3
No, this also may works but is the wrong approach.
grid.addListeners(Events.HeadercLick,.... is the correct one.
-
9 May 2011 2:09 AM #4
Thanks a lot sven. This was/is the solution. Really simple (if you know what to do
.
Similar Threads
-
Not able to sort grid column on click of column header
By amanind in forum Ext 3.x: Help & DiscussionReplies: 31Last Post: 9 Nov 2010, 5:54 AM -
What happens on grid column header click?
By Steve973 in forum Ext GWT: DiscussionReplies: 4Last Post: 22 Jun 2010, 8:26 AM -
grid header double click event
By shanney in forum Ext 2.x: Help & DiscussionReplies: 3Last Post: 1 Mar 2010, 7:23 PM -
How to call a javascript function on column header click in ext js grid?
By ketanmulay in forum Ext 3.x: Help & DiscussionReplies: 3Last Post: 21 Jan 2010, 9:36 PM -
click grid column header programmingly
By angelflaree in forum Ext 2.x: Help & DiscussionReplies: 0Last Post: 3 Apr 2008, 7:40 AM


Reply With Quote