More quick bindings

Or "Why I love functions".

In my previous post, Quick grid bindings, I showed how to use a custom function, applyFilter, that I had described earlier.

Some readers asked how to change the first grid to a tree, then to a dropdown. Just because I like to be ahead of things, and to show how easy is to reuse a function once you have created it, I threw in a repeater with radio buttons as well.


Or "Why I love functions".

In my previous post, Quick grid bindings, I showed how to use a custom function, applyFilter, that I had described earlier.

Some readers asked how to change the first grid to a tree, then to a dropdown. Just because I like to be ahead of things, and to show how easy is to reuse a function once you have created it, I threw in a repeater with radio buttons as well.

All three controls, dropdown, tree and radio button group filter the same grid, but they could use different grids if you wanted them to (just change the reference to the grid, contactList). Notice that they all call the same function, but pass different parameters with respect to what the term to filter by should be.

Note: For those who have not followed previous posts, the above code is not complete, you need to add the applyFilter function code. Or download the source for the complete code.

Live example

Download the source