Better drop-down template
Bhaskar's Prima Select template was behaving strange when a grid has two select column templates. The select options were getting mixed.
The version suggested by me has cleaner API and doesnât have content mixing problem.
// create select template var select1 = new My.Templates.Select; select1.setOptionsProperty("texts", ["Active", "Inactive"]); select1.setOptionsProperty("values", ["Active", "Inactive"]); select1.setOptionsProperty("count", 2); // assign this template to columns 3 sampleGrid.setColumnTemplate(select1, 3);
Also, another wanted row level filter feature is implemented. This allows having different options list based on some filter function.
I wish text/value were handled by some format, but default table model has no in-built format support, so it'll be too much tweakingâ¦
FYI: In FireFox dropdown is very slow, takes few seconds before it appears...