PDA

View Full Version : Changing the tpl dynamically?



sumith.paul
2 Nov 2012, 9:27 AM
Hi all,
Has anybody tried changing the tpl of a combobox dynamically?The scenario is i have a live combobox which loads datasets of multiple parameters depending on a condition.I have only a single store and single model.Model's fields are changed dynamically.Any lights on this?

mitchellsimoens
5 Nov 2012, 6:37 AM
IMO you should either create a new model or have all the fields setup in the model at definition. For the tpl, I would use if statements to change the behavior.

vasanth.kvj
5 Nov 2012, 11:23 AM
Sumith, Single store is fine but you have to create new models if you are going to get different response based on the condition . We can use the same model only if the response is going to be in same format with different content.. Sample code may help all to understand the question better !