$scope.databound = function () { custService.get().then(
function (response) { var columns = response.data; var gridObj = $("#Grid").data("ejGrid"); var colField=[]; for (var i = 0; i < gridObj.model.columns.length;i++){ colField.push(gridObj.model.columns[i].field) } for (var i = 0; i < columns.length; i++) colField.splice(colField.indexOf(columns[i]),1) gridObj.columns(colField, "remove"); } ) |
A support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.
https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents
Regards,
Jayaprakash K.
Hi Jayaprakash,
gridObj.columns(colField, "remove");
As you given solution for removing columns but i have used column chooser for that i hvae to only show and hide columns at service call i.e. custService.get().then(
and in column chooser i have to show all columns.
custService.get().then(
function (response) { var gridObj = $("#Grid").data("ejGrid"); //here i got 'data' following manner fields, headetext, alignments and visible gridObj.columns(response.data); $("#Grid").ejGrid("model.showColumnChooser", true); } ) |