Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » Editable GridTableViewer cell on the spot
Editable GridTableViewer cell on the spot [message #759327] Mon, 28 November 2011 11:40 Go to next message
Flav  is currently offline Flav Friend
Messages: 5
Registered: November 2011
Junior Member
Hey

I'm using a GridTableViewer (org.eclipse.nebula.jface.gridviewer.GridTableViewer) to display rows of data (Strings, single column per row). I want to add one row/cell programmaticaly, and it must become editable on the spot, with the cursor set in edit mode (blinking, ready to type) so I can input data and then save it. So, it's
about adding a new row and filling it on the spot, so I want the last row to editable and the cursor set on it when I click the "add new row button).

Can anyone please help me, how can this be done ? I need an answer fast Smile

Thx,
Flavian
Re: Editable GridTableViewer cell on the spot [message #760765 is a reply to message #759327] Mon, 05 December 2011 07:39 Go to previous messageGo to next message
Flav  is currently offline Flav Friend
Messages: 5
Registered: November 2011
Junior Member
up, I still need an answer please Smile
Re: Editable GridTableViewer cell on the spot [message #760767 is a reply to message #760765] Mon, 05 December 2011 07:59 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Call ColumnViewer#editElement(Object,int)
Am 05.12.11 08:39, schrieb Flav:
> up, I still need an answer please :)
Re: Editable GridTableViewer cell on the spot [message #760878 is a reply to message #759327] Mon, 05 December 2011 14:02 Go to previous messageGo to next message
Flav  is currently offline Flav Friend
Messages: 5
Registered: November 2011
Junior Member
Ty,

I'm getting a cast error from "java.util.ArrayList cannot be cast to MyClass".

This is my code. Can you please give me more details on how this should be implemented. Or is this cast exteption a bug ?


// declaration
private GridTableViewer headerTableViewer;

// for the first element
headerTableViewer.editElement(headerTableViewer.getElementAt(0), 0);

Re: Editable GridTableViewer cell on the spot [message #760908 is a reply to message #760878] Mon, 05 December 2011 15:00 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
So where is the exception happening?

Can we please see a stacktrace? Please also note that the method you are
using is meant to be internal to the framework as stated by the javadoc.

Tom

Am 05.12.11 15:02, schrieb Flav:
> Ty,
>
> I'm getting a cast error from "java.util.ArrayList cannot be cast to
> MyClass".
>
> This is my code. Can you please give me more details on how this should
> be implemented. Or is this cast exteption a bug ?
>
> // declaration
> private GridTableViewer headerTableViewer;
>
> // for the first element
> headerTableViewer.editElement(headerTableViewer.getElementAt(0), 0);
>
>
Previous Topic:New: A TreeMapper widget
Next Topic:GridTreeViewer - set selection on first element
Goto Forum:
  


Current Time: Fri Apr 19 23:17:30 GMT 2024

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

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

Back to the top