Results 1 to 3 of 3

Thread: Need Horizontal scroll bar in my grid ... very urgent !!

  1. #1
    Ext User
    Join Date
    Apr 2010
    Posts
    31

    Default Need Horizontal scroll bar in my grid ... very urgent !!

    Hi,
    I am unable to induce horizontal scrollbar in my grid. As a result the rendered grid does not show few columns. Its urgent pls help.

    Here goes my code -
    /*** Store ***************************/
    ds = new Ext.data.Store({
    id: 'ds',
    proxy: new Ext.data.HttpProxy({
    url: 'data.jsp',
    method: 'POST'
    }),
    baseParams:{task: "LISTING",name: name}, // this parameter is passed for any HTTP request
    reader: new Ext.data.JsonReader({
    root: 'results',
    totalProperty: 'total',
    id: 'id'
    },[
    {name: 'c1', type: 'string', mapping: 'c1'},
    {name: 'c2', type: 'string', mapping: 'c2'},
    {name: 'c3', type: 'string', mapping: 'c3'},
    {name: 'c4', type: 'float', mapping: 'c4'},
    {name: 'c5', type: 'float', mapping: 'c5'}
    ]),
    sortInfo:{field: 'IDpresident', direction: "ASC"}
    });

    dm = new Ext.grid.ColumnModel(
    [{
    header: 'Acct',
    readOnly: true,
    dataIndex: 'c1',
    width: 130,
    height: 50,
    hidden: false
    ,sortable: true
    },{
    header: 'Title',
    dataIndex: 'c2',
    width: 130
    ,sortable: true
    },{
    header: 'Type',
    dataIndex: 'c3',
    width: 130
    ,sortable: true
    },{
    header: 'Units',
    readOnly: true,
    dataIndex: 'c4',
    width: 130,
    hidden: false
    ,sortable: true
    },{
    header: 'col1',
    dataIndex: 'c4',
    width: 130,
    readOnly: false
    ,sortable: true
    },{
    header: 'col2',
    dataIndex: 'c4',
    width: 130,
    readOnly: false
    ,sortable: true
    },{
    header: 'col3',
    dataIndex: 'c4',
    width: 130,
    readOnly: false
    ,sortable: true
    },{
    header: 'col4',
    dataIndex: 'c4',
    width: 130,
    readOnly: false
    ,sortable: true
    }
    ]
    );
    dm.defaultSortable= true;

    /****Panel ******************/
    {
    xtype: 'fieldset',
    title: 'Projections',
    layout: 'form',
    colspan: 5,
    autoWidth:true,
    autoHeight:true,
    autoScroll:true,
    height: 300,
    border: false,
    items: [
    {
    id: 'grid',
    xtype: 'grid',
    title: '',
    height: 132,
    autoWidth:true,
    store: ds,
    autoScroll:true,
    cm: dc
    }
    ]
    }

  2. #2
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    Format your code.

    But the answer is: Size the GridPanel.

  3. #3
    Ext User
    Join Date
    Apr 2010
    Posts
    31

    Default

    It worked ....
    thanks for the reply.
    cheers.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •