MultiRowHideCommand [message #1010744] |
Mon, 18 February 2013 01:59  |
Eclipse User |
|
|
|
Hi,
in my application I have a master detail pattern and hide rows depending on the selection in the master.
When calling MultiRowHideCommand twice editing of the first row was blocked. It seams to be a bug if
calling MultiRowHideCommand and already hidden rows as parameter.
My workaround is to call first ShowAllRowsCommandand then MultiRowHideCommand.
Or may be my NatTable configuration is not as it should be?
my body layer stack is as follow:
public BodyLayerStack(IDataProvider dataProvider) {
bodyDataLayer = new DataLayer(dataProvider, 150, 20);
rowHideShowLayer = new RowHideShowLayer(bodyDataLayer);
selectionLayer = new SelectionLayer(rowHideShowLayer);
ViewportLayer viewportLayer = new ViewportLayer(selectionLayer);
setUnderlyingLayer(viewportLayer);
}
and the row layer stack
public class RowHeaderLayerStack extends AbstractLayerTransform {
public RowHeaderLayerStack(IDataProvider dataProvider, BodyLayerStack pBodyLayer) {
DataLayer dataLayer = new DataLayer(dataProvider, 200, 20);
RowHeaderLayer rowHeaderLayer = new RowHeaderLayer(dataLayer, pBodyLayer,
pBodyLayer.getSelectionLayer());
setUnderlyingLayer(rowHeaderLayer);
}
}
Martin
|
|
|
|
|
|
|
|
|
|
|
|
Re: MultiRowHideCommand [message #1017136 is a reply to message #1016912] |
Sat, 09 March 2013 14:12  |
Eclipse User |
|
|
|
Hi Dirk,
yes u are right its a misuse of the command. I took in deed the index instead of the position.
Understand now the matter and I have to be careful in the future about position and index.
Thanks and Gute Besserung, Martin
schrieb Dirk Fauth, Am 08.03.2013 09:09:
> Well, the hide commands take the position. Concerning the RowHideShowLayer this means that the
> positions you are using to hide are related to the visible rows.
>
> For example:
>
> You hide row at position 1 ... without any other transformation like filtering or sorting, this
> means the row with index 1 (concerning the data provider) will be hidden.
> Afterwards the row at position 1 is the row with index 2.
>
> If you are now trying to hide the row at index 2, you will in fact tell to hide the row at index 3
> because what you are really trying to do is to hide the row at position 1.
>
> Hope my explanation works out for you. I have a flu so some things might sound confusing.
>
> Maybe this helps in further understanding: http://eclipse.org/nattable/documentation.php?page=layer
>
> At least now it seems to be misusage instead of a bug.
>
> Greez,
> Dirk
|
|
|
Powered by
FUDForum. Page generated in 0.04904 seconds