PDA

View Full Version : How to use proxy model?



gurmeet
18th March 2015, 04:52
Hi,

Suppose i have a model which is having some (data) rows.
Now i want to display that data in two different views in different form like one view will display all data as it is in the model.
another view will display data in consolidated form for example
two or more than two rows belongs to same id or category, so need to display in single row.

Let say three rows have 101, view1 will be having three rows and view 2 will be only one consolidated row.

How i can achieve this.

I want underlying data should be same (don't want to duplicate for different views).

wysota
18th March 2015, 06:39
Implement a proxy model that will do the aggregation and apply it to one of the views while connecting the other view directly to the original model.

gurmeet
18th March 2015, 08:01
Hi,

Thanks for your reply.

One thing more, i just want to confirm that if proxy model is not duplicating underlying (source model) data?

wysota
18th March 2015, 08:18
Unless you make it duplicate some data, it operates directly on the underlying model.