I would think this is possible but I can't figure out how best to do it. Is it possible to dynamically create or duplicate 3 mirror image looking grids pulling from the same store
Assume you have a Model with the following fields:
COMP,DEPT,WTDAMT,MTDAMT,YTDAMT
Assume the data in the store looks like:
{COMP:1, DEPT:A,WTDAMT:100,MTDAMT:200,YTDAMT:300}
{COMP:1, DEPT:B,WTDAMT:100,MTDAMT:200,YTDAMT:300}
{COMP:1, DEPT:C,WTDAMT:100,MTDAMT:200,YTDAMT:300}
{COMP:2, DEPT:A,WTDAMT:100,MTDAMT:200,YTDAMT:300}
{COMP:2, DEPT:B,WTDAMT:100,MTDAMT:200,YTDAMT:300}
{COMP:2, DEPT:C,WTDAMT:100,MTDAMT:200,YTDAMT:300}
{COMP:3, DEPT:A,WTDAMT:100,MTDAMT:200,YTDAMT:300}
{COMP:3, DEPT:B,WTDAMT:100,MTDAMT:200,YTDAMT:300}
{COMP:3, DEPT:C,WTDAMT:100,MTDAMT:200,YTDAMT:300}
If you want to display 3 grids that are identical so that grid1 has only the COMP=1 and grid2 has only COMP=2 and grid3 only has COMP=3.
The only way I know to do this is to have 3 models, 3 stores and 3 views and then 3 procedures on the back end that populate them. This of course, works fine but makes for a lot of code to maintain. I would think there is a technique that could do this.
My first thought was to create a beforerender function in the controller and in that function create the panels/grids. But that seems a little "messy"; especially if there are going to be filters and/or buttons in the grids.
What would the pros do?
Assume you have a Model with the following fields:
COMP,DEPT,WTDAMT,MTDAMT,YTDAMT
Assume the data in the store looks like:
{COMP:1, DEPT:A,WTDAMT:100,MTDAMT:200,YTDAMT:300}
{COMP:1, DEPT:B,WTDAMT:100,MTDAMT:200,YTDAMT:300}
{COMP:1, DEPT:C,WTDAMT:100,MTDAMT:200,YTDAMT:300}
{COMP:2, DEPT:A,WTDAMT:100,MTDAMT:200,YTDAMT:300}
{COMP:2, DEPT:B,WTDAMT:100,MTDAMT:200,YTDAMT:300}
{COMP:2, DEPT:C,WTDAMT:100,MTDAMT:200,YTDAMT:300}
{COMP:3, DEPT:A,WTDAMT:100,MTDAMT:200,YTDAMT:300}
{COMP:3, DEPT:B,WTDAMT:100,MTDAMT:200,YTDAMT:300}
{COMP:3, DEPT:C,WTDAMT:100,MTDAMT:200,YTDAMT:300}
If you want to display 3 grids that are identical so that grid1 has only the COMP=1 and grid2 has only COMP=2 and grid3 only has COMP=3.
The only way I know to do this is to have 3 models, 3 stores and 3 views and then 3 procedures on the back end that populate them. This of course, works fine but makes for a lot of code to maintain. I would think there is a technique that could do this.
My first thought was to create a beforerender function in the controller and in that function create the panels/grids. But that seems a little "messy"; especially if there are going to be filters and/or buttons in the grids.
What would the pros do?
Comment