Grid - ClientItemTemplate

From Q2 2012 GridTemplateColumn exposes a ClientItemTemplate property that allows the rendering of pure HTML into the column cell and the evaluation of JavaScript and data expressions.

This RadGrid demo demonstrates how you can use the binding context of the item template to populate and customize the content of the column:

The Title column does styling on the rendered text using a javascript call which does a check on the value and based on it, inserts a different color style.

The Customer Info column makes a call to a custom HTTP handler passing it the record key value. Based on it, the handler returns the source for the image element.

The links in the Customer Info and Customer Location columns are built using the String.format method, where you can again use the binding context of the template to populate the formatted string with a value from the data item object.

Select items in RadGrid to view additional information about the customers.

You can use "Ctrl + Mouse Click" and "Shift + Mouse Click" to select multiple items

The grid rebinds to get and show the additioanl information when selection is changed