BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
module OrdersList {
export class OrderListVieModel {
ordersApi: string;
orders: KnockoutObservableArray<DataObjects.Order>;
orders2: ej.DataManager;
logger: Utils.Logger;
constructor(ordersPath: string) {
this.ordersApi = ordersPath;
this.orders = ko.observableArray([]);
this.logger = new Utils.Logger('OrderListVieModel');
/*this.orders2 = ej.DataManager("http://localhost:55282/api/orders");
//this.orders2 = new ej.DataManager(null);
this.orders2.adaptor = new ej.Adaptor().extend({
insert: function (dm, data) {
console.log(dm);
console.log(data);
return dm.dataSource.push(data);
},
processQuery: ej.JsonAdaptor.prototype.processQuery // resused process query from json adaptor
});*/
this.fetchOrders();
}
fetchOrders() {
$.ajax({
type: 'GET',
url: this.ordersApi,
success: (response) => {
var mappedData = $.map(response, (item) => {
var order = new DataObjects.Order(item);
return order;
});
this.orders(mappedData);
console.log(mappedData);
this.logger.info("Cписок заказов успешно загружен!");
},
error: (response) => {
this.logger.error("Произошла ошибка при выборке списка заказов!");
}
});
}
}
export function initModel() {
var ordersPath = "/api/orders";
var model = new OrderListVieModel(ordersPath);
ko.applyBindings(model);
}
}
Hi Andrey,
Please find the response.
I had try to create working model for load data from WebApi controller (as JSON) and show it in ejGrid. But this don't working. Anyway.
Also i try to create some DataManager and custom DataAdaptor but it also don't working. |
As you have already this query in forum # 117200 , please follow-up with that forum for further details. |
Also when i try to using controls in TypeScript i get Definition file but it have many errors and don't compile.
Documentation - very small and don't have many information about using of controls and also how to use bindings (knockout or angular). |
Currently we are validating your requirement and we will update with one business day 3/2/2015. |
Please let us know if you have any queries.
Regards,
Balaji Marimuthu
Hi Andrey,
Please find the response for documentation.
Query: TypeScript compliler shows much errors.
We considered this requirement “TypeScript compliler shows much errors” as bug and 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
Please let us know any queries.
Regards,
Balaji Marimuthu
Hi Andrey,
We have provided the typescript patch in the incident #134879, So please make use of it. Now, our Essential Studio controls will support the Typescript fully without any issue. Could you please let us know if you face any issues in Essential Studio controls while using the typescript, that will helpful for provide better solution ASAP.
Please let us know if you have any queries.
Regards,
Balaji Marimuthu