Results 1 to 5 of 5

Thread: Grid columns not hiding

  1. #1

    Default Grid columns not hiding

    How do I get the following columns to hide? I read the documentation and I should be able to hide them with the "hidden" config option... but it's not doing it, and I don't find anything searching through the forums...

    this.grid = new Ext.grid.GridPanel({
            store: new{
                    reader: new{root: "customers", id: "ClerkId"}, [
                            {name: 'ClerkId'},
                            {name: 'CustNo'},
                            {name: 'Customer'},
                            {name: 'Address'},
                            {name: 'Postcode'},
                            {name: 'Locality'},
                            {name: 'Email'},
                            {name: 'Phone'},
                            {name: 'Fax'},
                            {name: 'Clerk'},
                            {name: 'Config'}
                    data: Ext.exampledata.customers,
                    sortInfo:{field: 'Customer', direction: "ASC"},
            columns: [
                    {id:'ClerkId',header: "ClerkId", width: 70, sortable: true, hidden: true, dataIndex: 'ClerkId'},
                    {header: "CustNo", width: 47, sortable: true, hidden: true, dataIndex: 'CustNo'},
                    {header: "Clerk", width: 42, sortable: true, dataIndex: 'Clerk'}
            view: new Ext.grid.GroupingView({
                    forceFit: false,
                    groupTextTpl: '{text} ({[]} {[ > 1 ? "Items" : "Item"]})'
            frame: false,
            enableHdMenu : false,
            height: 250,
            sm: new Ext.grid.RowSelectionModel({singleSelect:true}),
            collapsible: true,
            animCollapse: false,
            bodyStyle: 'border: 0;'
    Would be great if someone could assist me with this, it's driving me nuts :-}

  2. #2
    Sencha User
    Join Date
    Mar 2007
    The Netherlands


    I tested your example and it only shows one column: 'Clerk'.

    Is there anything else wrong with your code?

  3. #3


    Actually, the code is not *exactly* as above... I am creating my own widget with the GridPanel code above inside the initComponent() method... i.e.

     Ext.Blah = Ext.extend(Ext.Panel, {
        initComponent : function(){
            <the code above>
            this.popup = new Ext.Layer({
                   shadow: this.shadow,
                   cls: [cls, this.listClass].join(' '),
                    constrain: false
    I don't have a clue why it works for you and not me

  4. #4


    Okay, I have no bloody idea what happened or why it did not work, but now it's working :-}

  5. #5


    maybe its your cached browser information that rendered the header

Posting Permissions

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