1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    1
    Vote Rating
    0
    Ferret_228 is on a distinguished road

      0  

    Default Unanswered: Grid dataIndex customisation and my misunderstanding

    Unanswered: Grid dataIndex customisation and my misunderstanding


    hello,

    I want to put some custom data in to column field... my data located at the local store.

    code of my grid:


    columns: [
    {text: "name", flex: 1, dataIndex: 'name'},
    {text: "type", flex: 1, dataIndex: 'type'},
    {text: "value", flex: 1, dataIndex: 'function', renderer: this.rendeValueColumn},
    {text: "parameter", flex: 1, dataIndex: 'parameter'},
    {text: "rule", flex: 1, dataIndex: 'rule'}
    ],

    i want to change 'rule' .

    i'm try to : var a = 'test'; {text: "rule", flex: 1, dataIndex: a} etc...

    but that way arent help me...

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,868
    Answers
    652
    Vote Rating
    438
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    You can use a renderer for that:

    Code:
    function myRule(val,meta,record){
      return val; // make changes here.
    }
    
    { text: "rule", flex: 1, dataIndex: 'rule', renderer: myRule }
    Regards,
    Scott.

Thread Participants: 1