Hello,
I am using MVC with angularJS.
I have to bind sysncfusion dropdown in syncfusion grid and Grid have grouping and sorting functionality.
I had tried normal html dropdown in grid using JS-render template and its working fine. but the problem is for consistency i have to use syncfusion dropdown.
I tried syncfusion dropdown in template but it is not working.
I made one JS playground for your better understand. JS PlayGround
Aspect quick reply
Many thanks,
Rakesh
$scope.compile = function (el) { $compile(el)($scope); $scope.databoundtest = "templateCompile"; //grid databound event $scope.complete = function(args){ //grid actionComplete event if(!this.initialRender) templateCompile(args); }; }); function templateCompile(args){ var scope = angular.element($(".e-grid")).scope(); scope.compile($(".drpAccessGroup")) //call the angular compile function |
<script type="text/x-template" id="accessGroupTemplate"> <input type="text" class="drpAccessGroup" ej-dropdownlist e-fields-id="drpAccessGroup" e-datasource=$parent.dropData e-fields-text="CustomerName" e-fields-value="CustomerName" e-width="100%" e-selecteditemindex="$parent.selIndex" /> $scope.getListofAccessGroup = function () { securityService.getAccessGroupsList() .then(function (accessGroupData) { $scope.dropData = accessGroupData; $scope.dropData.splice(0, 0, { markingString: "<Unrestricted>" }); $scope.selIndex = 3; }).catch(function (error) { }); |