The calculated field is not updated by the Kendo-UI grid and AngularJS

I have a kendo-ui grid with order lines. There is a column Qty, Priceand Total. The Total column is calculated ( Qty x Price ).

For editing, I use a custom popup that displays some additional information and allows the user to modify Qtyand Price. When they do, I want them to Totalautomatically update in the user editing form.

Here is a grid column definition for a common column:

{
   field: "total",
   title: "Total",
   width: 60,
   template: "#=qty*price#"
}

Here is the input field on the edit form:

<input name="total" style="width: 60px" />

:, , ( ), ().

#=total#, #=qty*price# ;

  • null
  • ,

.

Plunker, : http://plnkr.co/edit/cZw18btauqb9RPEpd5Kc?p=preview

? ( Kendo-ui AngularJS, )?

+4
2

, .

, :

schema: {
    model: {
        id: "itemNo",
        fields: {
            id: {
                type: "string",
                editable: false
            },
            price: {
                type: "number"
            },
            qty: {
                type: "number"
            }
        },
        total: function () {
            return this.get("qty") * this.get("price");
        }
    }
},

()

+4

, "incell", "change" grid . :

: Incell

+2

All Articles