Please help me on TableTreeView and OutlineView sorting problems

View: New views
2 Messages — Rating Filter:   Alert me  

Please help me on TableTreeView and OutlineView sorting problems

by Luc_B :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

In my program I was using the TableTreeView to display my nodes and their properties.

The problem I had with this component is that whenever I was sorting (clicking on headers) it would group the rows so it would only show distinct values. This but is documented but still there in NB 6.7.1.

So alternately, I changed my code to use the OutlineView. It seems to be buggy too.

Here is the code I use to force a sort on the first column.

//--------------------------------------------
ETableColumnModel etcm = (ETableColumnModel) ttvPeople.getOutline().getColumnModel();
final ETableColumn etc = (ETableColumn) etcm.getColumn(0);
etcm.setColumnSorted(etc, true, 1);
//------------------------------------------<

At first it works fine. But if I do another query and show new results a number one "1" is put into the header.


The only work around I found is to remove the OulineView from its container and create a new instance of it and then put it back in.

I am also having a problem with this call ttvPeople.getOutline().setColumnSelectionAllowed(false);

This never works the second time I call it.

I hope I am being clear if not I would be glad to provide you with more info as needed.

Thank you very much,
Luc

Re: Please help me on TableTreeView and OutlineView sorting problems

by Luc_B :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Turns out that the TreeTableView sorting problem was fixed in 6.8 beta.

Hope this can help someone.

Luc_B wrote:
Hello,

In my program I was using the TableTreeView to display my nodes and their properties.

The problem I had with this component is that whenever I was sorting (clicking on headers) it would group the rows so it would only show distinct values. This but is documented but still there in NB 6.7.1.

So alternately, I changed my code to use the OutlineView. It seems to be buggy too.

Here is the code I use to force a sort on the first column.

//--------------------------------------------
ETableColumnModel etcm = (ETableColumnModel) ttvPeople.getOutline().getColumnModel();
final ETableColumn etc = (ETableColumn) etcm.getColumn(0);
etcm.setColumnSorted(etc, true, 1);
//------------------------------------------<

At first it works fine. But if I do another query and show new results a number one "1" is put into the header.


The only work around I found is to remove the OulineView from its container and create a new instance of it and then put it back in.

I am also having a problem with this call ttvPeople.getOutline().setColumnSelectionAllowed(false);

This never works the second time I call it.

I hope I am being clear if not I would be glad to provide you with more info as needed.

Thank you very much,
Luc