Hello -
I am currently using the Ignite UI Angular Directives for the igGrid (http://igniteui.github.io/igniteui-angular/)
I am using the Angular Controller method to setup my grid.
My question:
In my Angular JS Controller, is there a way for me to call Methods on the Grid?
i.e.
$(
"#grid"
).igGridUpdating(
"addRow"
, {ID: 1, Name:
"John"
});
"setCellValue"
, 5,
"ProductName"
,
"bologna"
);
Since I cannot use the standard jQuery syntax in my Angular JS controller, is there another way to call these types of Methods on the Ignite/Angular Grid?
Such as $scope.grid.igGridUpdating(...)??
Thank You,
Dominick
Hello Dominick,
I am currently looking into this scenario and will keep you posted of my findings.
Hi Petar -
I have found a solution for this.
Here is how it can be done for example:
var grid = angular.element(document.querySelector('#myGrid')); grid.igGridUpdating("setCellValue", ui.rowID, "ColumnID", "NewValueForColumn");
In the HTML of the page, the ID of the igGrid must be myGrid in this case.
Thank you for your reply. Glad to hear that you have the issue resolved!
Just as a bit of additional information, changing a value in the datasource directly is also a possibility in this scenario as Angular's two-way binding should also update the grid.
Please do not hesitate to contact me if you have any further questions regarding this matter.