BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
Hi Rafael,
Sorry about the inconvenience caused.
We have facing some issue while using decimal data type values passed by the ej.DataManager to TreeGrid control. So at present we recommend you to use the float data type for the variable “LimitAmount1M”. Please refer the below code example for details.
[SampleContext.cs] namespace SyncFusionTreeGridExample.Service { [DataServiceKey("LocalFacilityId")] public class Facility { public String LocalFacilityId { get; set; }
public float LimitAmount1M { get; set; } } } |
We have also modified your sample and you can find the sample under the following location.
Regards,
Mahalakshmi K.
Hi Rafael,
Sorry about the inconvenience caused.
This is due to the default behavior of the OData Serialization in which decimal/int64 literal will be converted to string. Please refer to the below link.
https://msdn.microsoft.com/en-us/library/dd541461.aspx
OData v2/v3 don’t have support to handle this (OData V4 has support) and hence to resolve this we can use the custom adaptor as follows.
$(document).ready(function() { var moneyHandleAdaptor = new ej.ODataAdaptor().extend({
processResponse: function (data, ds, query, xhr, request, changes) { var data = this.base.processResponse.call(this, data, ds, query, xhr, request, changes);
var str = JSON.stringify(data.result ? data.result : data);
data = JSON.parse(str, function (key, val) {
if (key == "LimitAmount1M") val = parseFloat(val);
return val; });
return data; } });
var dataManager = ej.DataManager({ url: "/Service/DataService.svc/Facility", adaptor: new moneyHandleAdaptor() });
//… }); |
We have also modified your sample according to your requirement. You can find the sample under the following location.
Regards,
Mahalakshmi K.
Hi Rafael,
Thanks for the update.
Please let us know if you require further assistance on this.
Regards,
John R