-
9 Jun 2010 7:56 AM #1
[CLOSED] LiveGrid, Events.CellDoubleClick does not give back the correct model
[CLOSED] LiveGrid, Events.CellDoubleClick does not give back the correct model
LiveGrid,
The following code gives back correct result only if there was no scroll. If the view was scrolled, it will give back the model with the index of the visible row.
Code:Grid<DATA> grid = new Grid<DATA>(store, cm);.... ...... LiveGridView liveView = new LiveGridView(); liveView.setEmptyText("No rows available on the server."); grid.setView(liveView); grid.getSelectionModel().setSelectionMode(SelectionMode.MULTI); ........ grid.addListener(Events.CellDoubleClick, new Listener<GridEvent<CsoportosData>>() { public void handleEvent(final GridEvent<CsoportosData> be) { // goood CsoportosData m = getGrid().getSelectionModel().getSelectedItem(); // baaaad CsoportosData m2 = be.getModel(); String kocsiszam = m.get("kocsiszam"); kocsiszam = kocsiszam.replace(",", "<br>"); String kocsiszam2 = m2.get("kocsiszam"); kocsiszam2 = kocsiszam2.replace(",", "<br>"); MessageBox.info("Csoportosított: kocsiszámok", kocsiszam + "<br><br>" + kocsiszam2, null).setIcon(null); } });
Eg.: I have 100 rows, 24 is visible. When scrolling further, so the 10 through 34 is visible, double clicking on the first visible row (the 10th actual row), will give back the very first row's model.
-
9 Jun 2010 7:58 AM #2
You could ahve used the forumsearch.
You will need to call CsoportosData m = getGrid().getSelectionModel().getSelectedItem(); due to the way livegridview works.
We can only fix this with an overall redesign of the grid in GXT 3
-
9 Jun 2010 7:59 AM #3
There is one way to fix it, but that would be hacky. I already looked into it. If i get time, i will relook into it for GXT 2.2
-
9 Jun 2010 8:01 AM #4
I guessed that there should be something about it.. just I could not find it by ease... so I posted this.
Sure, I am using the one you have referred to.
But still GXT is an awesome toolkit!!!
Thank you for reporting this bug. We will make it our priority to review this report.
Similar Threads
-
[CLOSED] Not able to Reconfigure the LiveGrid
By kondala in forum Ext GWT: Bugs (2.x)Replies: 1Last Post: 7 May 2010, 2:42 AM -
[CLOSED-182][3.0.0] Grid Selection Model Events and enableDragDrop
By cparker in forum Ext 3.x: BugsReplies: 6Last Post: 5 Mar 2010, 9:55 AM -
[FIXED] [GXT 2.0.1] SetIconStyle method give back url(none)
By romero83 in forum Ext GWT: Bugs (2.x)Replies: 1Last Post: 12 Oct 2009, 5:21 AM -
Please give me a example on Ext.ux.grid.livegrid.Store
By padmavathi in forum Ext 2.x: Help & DiscussionReplies: 4Last Post: 2 Apr 2009, 2:20 AM


Reply With Quote