I have a Grid connected to DataSource and displayed on clipboard01.jpg
When I click on the Calculate button, I collect some the Grid's data and send it over to the server with an Ajax call
I return Json with some calculated values for the MTM field, which I'm adding to the grid...
Please look at picture: clipboard02.jpg now
The formatting for the Trade Date & Settle Date is now broken, although it was declarative set by the book.
1. Why is the formatting not obeyed?
2. In other words how do I manually set the data on the grid and preserve any formatting already set on the columns?
~ Boris
When I click on the Calculate button, I collect some the Grid's data and send it over to the server with an Ajax call
I return Json with some calculated values for the MTM field, which I'm adding to the grid...
$.ajax({
type: "POST",
dataType: "json",
data: unwindDataToPostObj,
url: direction
})
.done(function (response) {
var grid = $("#gridAssoc").data("kendoGrid");
grid.dataSource.data(response);
grid.refresh();
})
.fail(function (jqXHR) {
console.log("error");
});
Please look at picture: clipboard02.jpg now
The formatting for the Trade Date & Settle Date is now broken, although it was declarative set by the book.
// ** Grid widget $("#gridAssoc").kendoGrid({ dataSource: CFDUnwind._assocTradesDataSource, navigatable: true, selectable: "single", height: 300, resizable: true, sortable: { mode: "single", allowUnsort: false }, columns: [ { field: "Strategy", title: "Strategy", width: 60 }, { field: "ImagineSNum", title: "ImagineSNum", width: 50 }, { field: "TradeDate", title: "Trade Date", width: 48, template: '#= kendo.toString(TradeDate,"MM/dd/yyyy") #' }, { field: "SetlDate", title: "Settle Date", width: 48, template: '#= kendo.toString(SetlDate,"MM/dd/yyyy") #' },...etc....
1. Why is the formatting not obeyed?
2. In other words how do I manually set the data on the grid and preserve any formatting already set on the columns?
~ Boris