Question Dynamic Label For Grid - Kendo Ui

Hi,

I am trying to show some data in Kendo grid from Progress DB.

Item NO Description Order Qty (Prev Month1 ) Order Qty (Prev Month2 ) Order Qty (PrevMonth3 )
----------- ----------------- ------------------------------ ------------------------------- ------------------------------

I am getting the data from data_item.p in json format and I can display the grid with data. It is fine.

Temp table I am using is
Code:
DEF TEMP-TABLE tt-items
  FIELD ItemNumber  AS CHAR FORMAT "x(25)"
  FIELD ItemDesc  AS CHAR FORMAT "x(25)"
  FIELD OrdQty1  AS CHAR
  FIELD OrdQty2  AS CHAR
  FIELD OrdQty3  AS CHAR
=========================================
/* Data retrieval */
  var dataSource = new kendo.data.DataSource({
  transport: {
  read:  {
  url: crudServiceBaseUrl + "data_item",
  dataType: "jsonp",
   jsonpCallback: "callback"
  },
  parameterMap: function(options, operation) {
  if (operation !== "read" && options.models) {
  return {models: kendo.stringify(options.models)};
  }
  }
  },
==============================================
/*  Grid Display */

$("#grid").kendoGrid({
  dataSource: dataSource,
  toolbar: kendo.template($("#template").html()),
  excel: {
  fileName: "p.xlsx",
  allPages:true
  },
  pageable: false,
  resizable: true,
  columns: [
  { field: "ItemNo", title: "Item Number_P", width: "80px" },
  { field: "Desc", title:"Description", format: "{0:c}", width: "200px" },
  { field: "OrdQty1", title:"Prev1 ", width: "40px" },
  { field: "OrdQty2", title:"Prev2", width: "40px" },
  { field: "OrdQty3", title:"Prev3", width: "40px" },
====================================================

How can I change the label dynamically. Means if I run the Report Jan 16. Prev1 should show Dec 15 Prev2 show Nov 15 and Prev3 show Oct 15.

How can I accomplish this. Please help.

-Philip-
 
Last edited by a moderator:
Top