17 Jan 2011 6:06 PM #1
A SummarView like component that can render GXT Widget
I would like to add a GroupSummaryView like component that could contains Widget instead of only render numbers.
I digged into the code to find out a solution but the only thing I found yet is adding html code in the doGroupEnd() method of the GroupingView class.
I want to put a button at the end of each group in my grid. So, I still need to find out how to attach listener to this html rendered button.
It would be appreciated if someone has a more elegant solution for adding a GXT button (or any other GXT widget) directly instead.
Last edited by renaudb; 17 Jan 2011 at 6:07 PM. Reason: correction
22 Aug 2011 8:30 AM #2
Re: A SummarView like component that can render GXT Widget
I'd also be interested if someone has a better approach for this.
I needed to add two buttons in a row below each group and I already done this using the approach you describe below. I extended GroupingView and have overriden the doGroupEnd() method to:
1. Create a new DIV element, and a table element with 2 columns
2. Instantiate 2 new button objects and call button.render(leftColumn), otherButton.render(rightColumn)
3. Return buttonDiv.getInnerHtml()
Unfortunately this means most of the GXT Button behaviour is lost, including event handling code. I'm overriding GroupingView.onMouseDown() to handle the clicks. The issue I have is I'm now faced with having to fill in other missing behaviour e.g. onMouseOver behaviour.
Does anyone know a better way to do this that makes use of the existing button functionality?
By xperetz in forum Community DiscussionReplies: 5Last Post: 7 Oct 2010, 1:58 AM
By raidan2 in forum Ext GWT: Bugs (2.x)Replies: 2Last Post: 26 Nov 2009, 9:31 AM
By babyblue in forum Ext GWT: DiscussionReplies: 7Last Post: 27 Jul 2009, 1:07 AM
By jamelboubaker in forum Ext GWT: DiscussionReplies: 4Last Post: 30 Jun 2009, 3:45 AM
By raj_begood in forum Ext GWT: Help & Discussion (1.x)Replies: 2Last Post: 27 Jan 2009, 5:04 AM