PDA

View Full Version : problem with dynamic grid



petcy
8 Nov 2011, 8:39 PM
Hi all
i,m creating a dynamic grid.... as below


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??????????

skirtle
8 Nov 2011, 9:42 PM
Please don't post help requests to the Open Discussion forum.

Moving thread to ExtJS 3 Help...