Author Topic: Paramquery Grid Dropdown  (Read 2696 times)

[email protected]

  • Newbie
  • *
  • Posts: 1
    • View Profile
Paramquery Grid Dropdown
« on: September 06, 2016, 04:38:11 pm »
hey I am using Paramquery Grid and created a dropdown in one column. I am able to select and get the value from dropdown but when I am binding that grid with datamodel at that time I have only id field in the datamodel and i am not able to select that value by default.
var colModel = [
{title: "Country",dataIndx:"country"},
{
      dataIndx:"currency_id",
      hidden:false
    },
    {
      dataIndx: "currency",
      title: "Currency",
      dataType: "string",
      editor: {
        type: "select",
        mapIndices: { name: "currency", id:"currency_id" },
        labelIndx: "name",
        valueIndx: "id",
        options: [{id:1, name:"Rupee"},{id:2, name:"Dollar"}]
      }
    }];

var data = [{country:"India", id:1},{country:"USA", id:2}];

when assigning this data to the datamodel of grid, id's are being mapped with id column of the grid but I want to get selected the name of currency in currency column based on the id available in data array.

How can i do this?