Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Row clicked in rowTemplate Selection event(How to get the row selected when using rowTemplates)
Row clicked in rowTemplate Selection event [message #1194413] Mon, 18 November 2013 13:51 Go to next message
John Gymer is currently offline John GymerFriend
Messages: 279
Registered: November 2012
Location: UK
Senior Member
How do I determine which ROW of a table/tree was selected when using the new rowTemplate feature in RAP 2.2 M3 to detect CELL selection?
I can use the event.text to get the cell's name, which is great and event.detail is RWT.CELL, but where can I find the row index clicked?
It would be good to have event.index populated with this information...?
Thanks, John


---
Just because you can doesn't mean you should
Re: Row clicked in rowTemplate Selection event [message #1194938 is a reply to message #1194413] Mon, 18 November 2013 19:33 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

You mean the bindingIndex? You can't. The cell index does not
necessarily match the column index that the cell is bound to, that's why
we thought a name was more appropriate. But you can include the
bindingIndex in the cell name if you need it - would that help?

The alternative would be a dedicated listener type for cell selection.

Regards, Ralf

--
Ralf Sternberg

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Row clicked in rowTemplate Selection event [message #1196155 is a reply to message #1194938] Tue, 19 November 2013 09:20 Go to previous messageGo to next message
John Gymer is currently offline John GymerFriend
Messages: 279
Registered: November 2012
Location: UK
Senior Member
no, not the column... I need the row
maybe I'm being thick about it (normal state!) but I couldn't see any data to give me the row involved in the cell click


---
Just because you can doesn't mean you should
Re: Row clicked in rowTemplate Selection event [message #1197336 is a reply to message #1196155] Tue, 19 November 2013 21:37 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Same as in SWT, you don't get the row index, but the item: event.item

Does that help?

--
Ralf Sternberg

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Row clicked in rowTemplate Selection event [message #1198309 is a reply to message #1197336] Wed, 20 November 2013 08:51 Go to previous message
John Gymer is currently offline John GymerFriend
Messages: 279
Registered: November 2012
Location: UK
Senior Member
Thanks Ralf, yes, I was being stupid!


---
Just because you can doesn't mean you should
Previous Topic:RAP Theme Examples buggy
Next Topic:rowTemplate setVerticalAlignment doing nothing
Goto Forum:
  


Current Time: Fri Apr 26 18:12:44 GMT 2024

Powered by FUDForum. Page generated in 0.03235 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top