Docs
API
  • data

    Mixed

    It is used only for combo column type.
    It is list of possible combo values.

    It option data is missed than grid will try to generate values by self.

    Example

    
    {
      index: 'country',
      title: 'Country',
      type: 'combo',
      data: ['USA', 'Canada', 'England']
    }
    

    Example: Dynamic loading from server

    
    {
      index: 'country',
      title: 'Country',
      type: 'combo',
      data: {
        proxy: {
          url: 'countries.php',
          method: 'POST'
        }
      }
    }
    ...
    countries.php
    {"data": ["USA", "Canada", "England"]}
    

    Returned data from server must be valid JSON, in other case it will not be rendered

    Data - array of objects

    Example: Local Data

    
    {
      index: 'country',
      title: 'Country',
      type: 'combo',
      displayKey: 'country',
      data: [
        {country: "USA", id: 1},
        {country: "Canada", id: 2},
        {country: "England", id: 3}
      ]
    }
    
    

    Example: Server Data

    
    {
      index: 'country',
      title: 'Country',
      type: 'combo',
      displayKey: 'country',
      data: {
        proxy: {
          url: 'countries.php',
          method: 'POST'
        }
      }
    }
    ...
    countries.php
    {"data": [{"country": "USA", "id": 1},{"country": "Canada", id: 2},{"country": "England", id: 3}]}
    

    Returned data from server must be valid JSON, in other case it will not be rendered

    Default

    
    undefined
    

    See also

    Method setColumnComboData