Support #1369

Custom View

Added by Sebastian Olter 11 months ago. Updated 4 months ago.

Status:ClosedStart date:07/25/2012
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

I have a custom item view, ie. a class inherited from Wt::WAbstractItemView. It displays a single row from a model and allows to edit its fields. The model represents a wide database table (20+ fields) and is shared between two views. The other view is a WTableView which only displays 5 most meaningful columns. When a row is selected, my single-row view is scrolled to that position. But apparently, it does not save data into the model. What should I do to have an editable view? I mean, what methods must be implemented (and how) in the view in order to save edited fields?

History

#1 Updated by Koen Deforche 8 months ago

  • Status changed from New to Feedback

Hey,

You need to call setData() and pass on the edited data as EditRole data.

Regards,
koen

#2 Updated by Koen Deforche 5 months ago

  • Status changed from Feedback to Resolved

#3 Updated by Koen Deforche 4 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF