I have a calculated non editable cell bound to a datasource model. While editing the cell value is calculated, the new value is reflected in the model but does not render to the screen.
Any ideas?
export
function
init(columns: any) {
var
ds =
new
nkfDataSources.FilterByJobQuickEntryDistribution();
ds.group = { field:
"PropertyName"
};
grid = $(
"#jobQuickEntryDistributionGrid"
).kendoGrid({
columns: columns,
groupable:
false
,
pageable:
true
,
sortable:
true
,
filterable:
true
,
toolbar: kendo.template($(
"#grid_jobQuickEntryDistribution_toolbar"
).html()),
dataSource: ds.get(onGridparameterMap),
editable:
true
,
edit:
function
(e) {
e.model.unbind(
"change"
, model_change).bind(
"change"
, model_change);
}
}).data(
"kendoGrid"
);
}
function
model_change(e) {
var
model =
this
;
model.NetFee = nkfCommon.Calculate.netFee(
model.GrossFee,
nkfCommon.Calculate.departmentOffset(model.GrossFee, model.DepartmentOffset),
nkfCommon.Calculate.expenses(model.ClientReimbursedExpenses, model.NonClientReimbursedExpenses, model.DirectBilledExpenses));
}
var
columns = [
{ field:
"AppraiserName"
, title:
"@Resources.NGage.JobQuickEntryResource.AppraiserNameField"
, width:
"18%"
},
{ field:
"RoleTypeDescription"
, title:
"@Resources.NGage.JobQuickEntryResource.RoleTypeDescriptionField"
, width:
"17%"
},
{ field:
"GrossFee"
, title:
"@Resources.NGage.JobQuickEntryResource.GrossFeeField"
, format:
"{0:c}"
, width:
"10%"
, attributes: { style:
"text-align:right"
} },
{ field:
"DepartmentOffset"
, title:
"@Resources.NGage.JobQuickEntryResource.DepartmentOffsetField"
, format:
"{0:p5}"
, width:
"10%"
, attributes: { style:
"text-align:right"
} },
{ field:
"ClientReimbursedExpenses"
, title:
"@Resources.NGage.JobQuickEntryResource.ClientReimbursedExpensesField"
, format:
"{0:c}"
, width:
"10%"
, attributes: { style:
"text-align:right"
} },
{ field:
"NonClientReimbursedExpenses"
, title:
"@Resources.NGage.JobQuickEntryResource.NonClientReimbursedExpensesField"
, format:
"{0:c}"
, width:
"10%"
, attributes: { style:
"text-align:right"
} },
{ field:
"DirectBilledExpenses"
, title:
"@Resources.NGage.JobQuickEntryResource.DepartmentOffsetField"
, format:
"{0:c}"
, width:
"10%"
, attributes: { style:
"text-align:right"
} },
{
field:
"NetFee"
,
title:
"@Resources.NGage.JobQuickEntryResource.NetFeeField"
,
format:
"{0:c}"
,
width:
"10%"
,
attributes: { style:
"text-align:right"
},
footerTemplate:
"<span style='float:right'>#= kendo.toString(@ViewBag.JobTeamDistributionAmount, 'c2')# </span>"
},
{ field:
""
, title:
" "
, width:
'6%'
, template:
"<a href='/JobQuickEntry/Edit/#: Id #' class='row-link-padding' style='padding-right:0; padding-left:0' >@Resources.MessageResources.EditField</a> "
, editable:
false
},
];
Regards
Floyd