Skip to content

Instantly share code, notes, and snippets.

@manrueda manrueda/grid.html

Last active Jun 27, 2016
What would you like to do?
WjFlexGridCellTemplate with angular templates, width error
<wj-flex-grid items-source="data" style="height: 150px;margin-top:10px" control="flex" initialized="initialized(s,e)">
<wj-flex-grid-column header="Country" binding="country" width="*" allow-resizing="false">
<wj-flex-grid-cell-template cell-type="Cell">
<div ng-include="'tpl.html'"></div>
<wj-flex-grid-column header="Sales" binding="sales" width="*" allow-resizing="false"></wj-flex-grid-column>
<wj-flex-grid-column header="Expenses" binding="expenses" width="*" allow-resizing="false"></wj-flex-grid-column>
<wj-flex-grid-column header="Downloads" binding="downloads" width="*" allow-resizing="false"></wj-flex-grid-column>
<!DOCTYPE html>
<html lang="en">
<script type="text/javascript" src=""></script>
<script type="text/javascript" src=""></script>
<link rel="stylesheet" type="text/css" href="">
<link rel="stylesheet" type="text/css" href="">
<script type="text/javascript" src=""></script>
<script type="text/javascript" src=""></script>
<script type="text/javascript" src=""></script>
<div ng-app="app" ng-controller="appCtrl">
<div ng-view></div>
<button ng-click="click()">Reload Route</button>
// define app, include Wijmo 5 directives
var app = angular.module('app', ['ngRoute', 'wj']);
app.config(function($routeProvider) {
.when('/grid', {
templateUrl: 'grid.html',
controller: 'GridController'
app.controller('appCtrl', function ($scope, $route) {
$ = function (){
// controller
app.controller('GridController', function ($scope, $timeout) {
// create some random data
var countries = 'US,Germany,UK,Japan,Italy,Greece'.split(','),
data = [];
for (var i = 0; i < countries.length; i++) {
country: countries[i],
downloads: Math.round(Math.random() * 20000),
sales: Math.random() * 10000,
expenses: Math.random() * 5000
// expose data as a CollectionView to get events
$ = new wijmo.collections.CollectionView(data);
$scope.initialized = function(s,e){
$timeout(function () {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.