Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » Grid: setting checked state of the item according to the model
Grid: setting checked state of the item according to the model [message #478913] Fri, 07 August 2009 13:07 Go to next message
blutkind  is currently offline blutkind Friend
Messages: 25
Registered: July 2009
Junior Member
Hi,

We are using GridTableViewer in our project, and while it works fine
updating item texts and images, I couldn't find the way to update checked
state of the item for a certain column according to the model changes. Can
anyone advise on how to do this? For now we only need to update it at the
grid creation time, so we can just do that by hand, but we'll definitely
need to track real-time changes in the future.

Thanks in advance,
Stanislav
Re: Grid: setting checked state of the item according to the model [message #478922 is a reply to message #478913] Fri, 07 August 2009 13:59 Go to previous messageGo to next message
blutkind  is currently offline blutkind Friend
Messages: 25
Registered: July 2009
Junior Member
I managed to overcome this by extending GridTableViewer and doing the job
in doUpdateItem(). However, my solution is hardcoded to work with my
model. I'd like (and I think we all would like) to have a generic
approach, something similar to a CheckboxTableViewer for default SWT
table. The one problem that doesn't allow to simply copy the code of the
CheckboxTableViewer is that grid can have any column checkable. I think
CheckboxGridTableViewer should differ in the setCheckStateProvider(),
allowing to set them for different GridViewerColumns, and in
doUpdateItem(), where we need to check all checkStateProviders that were
set and check/uncheck item at necessary indices.

I'd like to write and contribute this stuff, but I fear I won't be able to
find time for this, so if anybody want to help me and all the Nebula
community will greatly appreciate this.

Regards,
Stanislav
Re: Grid: setting checked state of the item according to the model [message #478943 is a reply to message #478922] Fri, 07 August 2009 15:27 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 5462
Registered: July 2009
Senior Member
At least please file a bugzilla and then one who has time can work on it.

Tom

Stanislav Vodetskyi schrieb:
> I managed to overcome this by extending GridTableViewer and doing the
> job in doUpdateItem(). However, my solution is hardcoded to work with my
> model. I'd like (and I think we all would like) to have a generic
> approach, something similar to a CheckboxTableViewer for default SWT
> table. The one problem that doesn't allow to simply copy the code of the
> CheckboxTableViewer is that grid can have any column checkable. I think
> CheckboxGridTableViewer should differ in the setCheckStateProvider(),
> allowing to set them for different GridViewerColumns, and in
> doUpdateItem(), where we need to check all checkStateProviders that were
> set and check/uncheck item at necessary indices.
>
> I'd like to write and contribute this stuff, but I fear I won't be able
> to find time for this, so if anybody want to help me and all the Nebula
> community will greatly appreciate this.
>
> Regards,
> Stanislav
>
Re: Grid: setting checked state of the item according to the model [message #595870 is a reply to message #478913] Fri, 07 August 2009 13:59 Go to previous message
blutkind  is currently offline blutkind Friend
Messages: 25
Registered: July 2009
Junior Member
I managed to overcome this by extending GridTableViewer and doing the job
in doUpdateItem(). However, my solution is hardcoded to work with my
model. I'd like (and I think we all would like) to have a generic
approach, something similar to a CheckboxTableViewer for default SWT
table. The one problem that doesn't allow to simply copy the code of the
CheckboxTableViewer is that grid can have any column checkable. I think
CheckboxGridTableViewer should differ in the setCheckStateProvider(),
allowing to set them for different GridViewerColumns, and in
doUpdateItem(), where we need to check all checkStateProviders that were
set and check/uncheck item at necessary indices.

I'd like to write and contribute this stuff, but I fear I won't be able to
find time for this, so if anybody want to help me and all the Nebula
community will greatly appreciate this.

Regards,
Stanislav
Re: Grid: setting checked state of the item according to the model [message #595879 is a reply to message #478922] Fri, 07 August 2009 15:27 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 5462
Registered: July 2009
Senior Member
At least please file a bugzilla and then one who has time can work on it.

Tom

Stanislav Vodetskyi schrieb:
> I managed to overcome this by extending GridTableViewer and doing the
> job in doUpdateItem(). However, my solution is hardcoded to work with my
> model. I'd like (and I think we all would like) to have a generic
> approach, something similar to a CheckboxTableViewer for default SWT
> table. The one problem that doesn't allow to simply copy the code of the
> CheckboxTableViewer is that grid can have any column checkable. I think
> CheckboxGridTableViewer should differ in the setCheckStateProvider(),
> allowing to set them for different GridViewerColumns, and in
> doUpdateItem(), where we need to check all checkStateProviders that were
> set and check/uncheck item at necessary indices.
>
> I'd like to write and contribute this stuff, but I fear I won't be able
> to find time for this, so if anybody want to help me and all the Nebula
> community will greatly appreciate this.
>
> Regards,
> Stanislav
>
Previous Topic:Grid: setting checked state of the item according to the model
Next Topic:select item in the gallery widget
Goto Forum:
  


Current Time: Sun Nov 23 03:39:33 GMT 2014

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

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