I already tried a lot of things to get REST working with the IgGrid, but I have no luck and there is no good documentation on how to do this in angular2.
Which are the evens to trigger the inline create/remove/update?
I have the following grid options:
this.gridOptions = { width: "100%", height: "400px", autoGenerateColumns: false, dataSource: [], columns: [ { key: "code", headerText: "Code", width: "250px", dataType: "string" }, { key: "description", headerText: "Omschrijving", width: "250px", dataType: "string" } ], primaryKey: "id", restSettings: { create:{ url: '/api/client',//or this must be the full url? batch: false }, update: { url: '/api/client' }, remove:{ url: '/api/client', batch: false } }, features: [ { name: "Updating", columnSettings: [ { columnKey: "id", readOnly: true } ] }, { name: "Paging" }, { name: "Filtering" }, { name: "Sorting" } ] };
After adding a new row in the grid nothing happens. The POST is not triggered and it is the same for the delete and update calls.
I've already tried to search on google for information on this topic but the only things I've found are with jQuery.
Can somebody please provide me with an answer?
Hello L'oo ,
No. The Angular 2 components simply wrap the jQuery UI based IgniteUI controls and allow you to take advantage of Angular’s declarative initialization syntax and two-way databinding, however the IgniteUI controls are not native angular components and as such don’t have API methods that can be called directly from the components.
Best Regards,
Maya Kirova
Infragistics, Inc.
http://es.infragistics.com/support
Yes I've already found this method, but is there a typescript equivalent to the jQuery saveChanges method?
Hello Jurgen,
Thank you for posting in our forum.
The grid does not automatically trigger remote requests on each change. Instead it stores the list of all transactions made on the grid and lets you decide when to send them to the server.To save the changes to the server the saveChanges method should be called.For example:$(".selector").igGrid("saveChanges");
Where “.selector” should be a jQuery selector pointing to the igGrid element.
You can find more information on the method in our API docs:
http://www.igniteui.com/help/api/2016.1/ui.iggrid#methods:saveChanges
Let me know if you have any additional questions or concerns.
Best Regards,Maya KirovaInfragistics, Inc.http://es.infragistics.com/support