/// <reference path="~/GeneratedArtifacts/viewModel.js" />
/// <reference path="../Scripts/wijmo.cba.js" />

myapp.GridThemes.FlexGrid_render = function (element, contentItem) {
    $(element).addClass("custom-flex-grid");
    if ($("#customCss").length == 0) {
        $("<link id='customCss' rel='stylesheet' type='text/css' href='Content/wijmo.custom.css' />").appendTo($("head"));
    }

    var grid = new c1.cba.FlexGrid($(element), contentItem);
    var collectionView = new c1.cba.LightSwitchCollectionView(contentItem);
    grid.wjControl.itemsSource = collectionView;
};
