There is something I've struggled with for a long time, so I figured it was time to do it the best practice way instead of working around the issue.
I have situations where I have relatively large apps and would like to use components in different views. To date, I have just duplicated the component and given it a new name as I have not been able to figure out how to reference it in different views.
For example, a Combobox that allows the user to search vendors by name. This combobox may appear in different Tabs, Grids, Windows or Forms. I'm pretty sure I only have to have one instance of this component. However, when I try to use it the second or more times, it's as if the app always uses the original instance in the view that originally contained it rather than the view the user is trying to use it in.
I'm sure there's a simple technique that allows for this but I've never been able to figure it out and my guess is it may be something to do with an itemid or and id property.
Another example is a grid. One tab may contain this grid that display the store in a certain fashion while another tab may filter it differently. The store and columns in the grid are always the same, but the backend processing is different. So there is no reason to make two grids. I should be able to use it in as many different views as needed.
Any hints on how to handle this would be much appreciated.
I have situations where I have relatively large apps and would like to use components in different views. To date, I have just duplicated the component and given it a new name as I have not been able to figure out how to reference it in different views.
For example, a Combobox that allows the user to search vendors by name. This combobox may appear in different Tabs, Grids, Windows or Forms. I'm pretty sure I only have to have one instance of this component. However, when I try to use it the second or more times, it's as if the app always uses the original instance in the view that originally contained it rather than the view the user is trying to use it in.
I'm sure there's a simple technique that allows for this but I've never been able to figure it out and my guess is it may be something to do with an itemid or and id property.
Another example is a grid. One tab may contain this grid that display the store in a certain fashion while another tab may filter it differently. The store and columns in the grid are always the same, but the backend processing is different. So there is no reason to make two grids. I should be able to use it in as many different views as needed.
Any hints on how to handle this would be much appreciated.
Comment