Is there a way to supply the columnDefs to ui-grid with a promise? -
the data ui-grid seems support promise of data, columndef option not seem to. if data coming in dynamic , column defs loaded dynamically how can columns definition specified promise.
you can supply columndefs promise's return value in .then() handler:
$scope.gridoptions = { data: [ ... ] }; columnservice.getcolumns() .then(function (columndefs) { $scope.gridoptions.columndefs = columndefs; });
Comments
Post a Comment