Selection in WTableView
Added by Markus Raabe over 1 year ago
I have a question about Selection in a WTableView.
According to the documentation for WTableView this should be possible and uses the SelectionModel. In the documentation of the selectionModel it is stated that this can only be used for a WTreeView.
Should the selection be possible? It doesn't work for me at least.
I set:
m_bearingView->setModel(m_bearingModel);
m_bearingView->setSelectionMode(Wt::SingleSelection);
m_bearingView->setSelectionBehavior(Wt::SelectRows);
m_bearingView->setSortingEnabled(true);
m_bearingView->setAlternatingRowColors (true);
Thanks for any information
Markus
Replies
RE: Selection in WTableView - Added by Markus Raabe over 1 year ago
The same code using a TreeView works as expected. So I will use this.
But the documentation is not really clear on this.
RE: Selection in WTableView - Added by Koen Deforche over 1 year ago
Hey Markus,
The treeview-dragdrop example shows that selection works on a WTableView (much the same as it does for WTreeView, in fact, this is code that is shared). Could you be more specific about the wrong behavior you see ?
Regards,
koen
RE: Selection in WTableView - Added by Markus Raabe over 1 year ago
I switched back to TableView and the selection is indeed working, but the selection is not marked as in the listview.
So, I just don't see the selection.
And the reason is using old resources. After updating these to the current wt version it works as it should.
Sorry for asking without properly checking