1. #1
    Sencha User
    Join Date
    Mar 2014
    Posts
    7
    Vote Rating
    0
    Arsench is on a distinguished road

      0  

    Default Data into gridview

    Data into gridview


    Hello world,I have a grid with 2 columns. COL1 and COL2, and I want to add hardcoded data into grid only one row, but I don’t know how to do that, example:

    Code:
    COL1    COL2
    YES    NO
    Could you help me please? Thanks in advance.

  2. #2
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    3,936
    Vote Rating
    130
    fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all

      0  

    Default


    Sencha Touch 1 did not have a grid. But to use hard coded data you can use the store data config.
    Get more personalized support via a support subscription.

    Want to learn Sencha Touch 2? Check out
    Sencha training
    Sencha Touch in Action

    Need more help with your app? Hire Sencha Services services@sencha.com

    When posting code, please use BBCode's CODE tags.

    Need to include a test case use:
    The official Sencha Fiddle

  3. #3
    Sencha User
    Join Date
    Mar 2014
    Posts
    7
    Vote Rating
    0
    Arsench is on a distinguished road

      0  

    Default


    Hi, I try this and works ok.


    Code:
    { 
        xtype:   'grid',
       id:      'myGrid',
       title:  'Your grid title',
       columns: [{
    
    header: 'Yes'
    dataIndex: 'yes',
    // some additional config data, height etc...
    },{
    header: 'No',
    dataIndex: 'no',
     }],
                      
     store:{
                        fields:['yes','no'],
                       data:[{'Yes'},{'No'}]
    }

Thread Participants: 1

Tags for this Thread