I have defined a grid as follows...
$("#grid").kendoGrid({
dataSource: {
data: result.d,
schema: {
model: {
fields: {
ClientID: { type: "string" },
ClientName: { type: "string" },
ClientIndexRating: { type: "number" },
ChrgKPI: { type: "number" },
PymtKPI: { type: "number" },
RevKPI: { type: "number" }
}
}
}
},
navigatable: true,
scrollable: true,
sortable: {
mode: "multiple"
},
groupable: true,
resizable: true,
filterable: true,
reorderable: true,
selectable: "row",
columns: [
{
field: "ClientID",
title: "Client ID",
width: 100
},
{
field: "ClientName",
title: "Client Name",
width: 300
},
{
field: "ClientIndexRating",
title: "Rating",
width: 100
},
{
field: "ChrgKPI",
title: "Charges vs. KPI",
width: 100,
format: "{0:n2}"
},
{
field: "PymtKPI",
title: "Payment vs. KPI",
width: 100,
format: "{0:n2}"
},
{
field: "RevKPI",
title: "Revenue vs. KPI",
width: 100,
format: "{0:n2}"
}
]
});
}
I would like to add two columns that would pass data from the current row to a function and which would in turn go get something and then stuff it into the correct row/column. How do I go about doing this?
Thanks,
Andy
$("#grid").kendoGrid({
dataSource: {
data: result.d,
schema: {
model: {
fields: {
ClientID: { type: "string" },
ClientName: { type: "string" },
ClientIndexRating: { type: "number" },
ChrgKPI: { type: "number" },
PymtKPI: { type: "number" },
RevKPI: { type: "number" }
}
}
}
},
navigatable: true,
scrollable: true,
sortable: {
mode: "multiple"
},
groupable: true,
resizable: true,
filterable: true,
reorderable: true,
selectable: "row",
columns: [
{
field: "ClientID",
title: "Client ID",
width: 100
},
{
field: "ClientName",
title: "Client Name",
width: 300
},
{
field: "ClientIndexRating",
title: "Rating",
width: 100
},
{
field: "ChrgKPI",
title: "Charges vs. KPI",
width: 100,
format: "{0:n2}"
},
{
field: "PymtKPI",
title: "Payment vs. KPI",
width: 100,
format: "{0:n2}"
},
{
field: "RevKPI",
title: "Revenue vs. KPI",
width: 100,
format: "{0:n2}"
}
]
});
}
I would like to add two columns that would pass data from the current row to a function and which would in turn go get something and then stuff it into the correct row/column. How do I go about doing this?
Thanks,
Andy