<h1>
    Cell Templates
</h1>
<p>
    You can use <b>format</b> function to implement a
    basic template handling mechanism.
</p>
<p>
    The grid below handles the <b>formatItem</b> event to
    generate the content for cells in the "Template" column
    using a template element defined in the markup:
</p>

@(Html.C1().FlexGrid().Id("theGrid")
    .AutoGenerateColumns(false)
    .Columns(cs=>
    {
        cs.Add().Binding("country").Header("Country");
        cs.Add().Binding("template").Header("Template").Width("130").IsReadOnly(true);
        cs.Add().Binding("sales").Header("Sales").Format("n2");
        cs.Add().Binding("expenses").Header("Expenses").Format("n2");
    })
    .ShowAlternatingRows(false)
)
