1. #1
    Sencha User petcy's Avatar
    Join Date
    Aug 2010
    Location
    India
    Posts
    137
    Vote Rating
    0
    petcy is on a distinguished road

      0  

    Default problem with dynamic grid

    problem with dynamic grid


    Hi all
    i,m creating a dynamic grid.... as below

    Code:
    var columns=[];
    var ldetails=[];
    var reader=[];
    //count-------->no.of columns....
    //aa-------->an array of column heads
    for(var c=0;c<count;c++)
    {
        columns[c]={
            header :aa[c],
            width :250,
            sortable :true,
            dataIndex :aa[c]
        };    
    }
                    
    for(var c=0;c<count;c++)
    {
        reader[c]={
            name:aa[c],
            type:'string'
        };
    }
    
    var myReader = new Ext.data.ArrayReader({},reader);
    
    var defaultstore = new Ext.data.Store({
        reader :myReader
    });
    
    var grid = new Ext.grid.GridPanel({
        frame :true,
        height :100,
        width :'100%',
        autoScroll:true,
        sm: new Ext.grid.RowSelectionModel({singleSelect:true}),
        store :defaultstore,
        columns : columns
    });
    Here ldetails is single dimensional array and i want to create grid filling with first column.. and others are null/editable

    is this possible??????????
    Last edited by skirtle; 8 Nov 2011 at 9:41 PM. Reason: Add CODE tags and reindent
    "You can avoid reality, but you cannot avoid the consequences of avoiding reality."

    Petcy
    Extjs,Java Developer
    Spectrum Soft-tech Software Solutions
    India

  2. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,505
    Vote Rating
    287
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    Please don't post help requests to the Open Discussion forum.

    Moving thread to ExtJS 3 Help...

Thread Participants: 1