Results 1 to 8 of 8

Thread: Problem with hidden column in grid

  1. #1
    Ext User manugoel2003's Avatar
    Join Date
    Mar 2007
    Location
    New Delhi, India
    Posts
    314
    Vote Rating
    0
      0  

    Default Problem with hidden column in grid

    hi Jack,

    i have used colModel.setHidden(0,true); in my code. After using this method grid nevigation stop working. i have tried {header: "Ticket No1.", width: 220, sortable: true, hidden: true} also but the same output. could you please help me.

    var schema = {
    root: 'rows',
    id: 'ticket_id',
    fields: ["ticket_id1", "cr_date2", "status_id", "category"]
    };
    dataModel = new YAHOO.ext.grid.JSONDataModel(schema);
    var colModel = new YAHOO.ext.grid.DefaultColumnModel([
    {header: "Ticket No1.", width: 220, sortable: true, hidden: true},
    {header: "Date of Creation", width: 220, sortable: true},
    {header: "S", width: 220, sortable: true},
    {header: "Category", width: 220, sortable: true}
    ]);
    dataModel.setDefaultSort(colModel, 2, 'DESC');



    // create the Grid
    var grid = new YAHOO.ext.grid.Grid('content', {
    dataModel: dataModel,
    colModel: colModel,
    monitorWindowResize: true,
    stripeRows: false,
    trackMouseOver: true
    });
    grid.render();

    //Manish Resize Grid Columns
    dataModel.addListener('load', function(){
    grid.getView().autoSizeColumns();
    grid.getView().getPageToolbar();
    }, true);


    dataModel.load('json1.js');

  2. #2
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    New York, NY
    Posts
    6,956
    Vote Rating
    20
      0  

    Default

    Can you put up a link?

    Also, will you try commenting out the call to "autoSizeColumns()" and seeing if it's still broken.

  3. #3
    Ext User manugoel2003's Avatar
    Join Date
    Mar 2007
    Location
    New Delhi, India
    Posts
    314
    Vote Rating
    0
      0  

    Default

    Thanks for your quick response.

    i did the same but no success (//grid.getView().autoSizeColumns(); ).

    I have uploaded the sample application on http://egov.e11online.com/sample.htm

    Regards,
    Manu

  4. #4
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    New York, NY
    Posts
    6,956
    Vote Rating
    20
      0  

    Default

    The site won't load for me. No response?

  5. #5
    Ext User manugoel2003's Avatar
    Join Date
    Mar 2007
    Location
    New Delhi, India
    Posts
    314
    Vote Rating
    0
      0  

    Default

    Try refreshing it a couple of times. Might be a server problem. I have checked the link again.

  6. #6
    Ext User manugoel2003's Avatar
    Join Date
    Mar 2007
    Location
    New Delhi, India
    Posts
    314
    Vote Rating
    0
      0  

    Default

    I have uploaded it in another location anyways. So, now it is hosted on two locations.

    http://egov.e11online.com/sample.htm
    http://osscube.com/sample/sample.htm

  7. #7
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    New York, NY
    Posts
    6,956
    Vote Rating
    20
      0  

    Default

    Thanks for the second link. It looks good in FF but doesn't appear in IE. There are 2 possible problems I see:

    You are calling for json1.js. IE is very flaky about content types and if they aren't right it will fail to load. It's very possible it is bombing here because of the extension .js is causing your server to return a content-type for javascript. I know it sounds dumb, but I would say 75% likely to be the problem.

    grid.getView().getPageToolbar(); in the load handler will bomb since your data model doesn't use paging and therefore won't use a PagedGridView and so getPageToolbar won't exist.

  8. #8
    Ext User manugoel2003's Avatar
    Join Date
    Mar 2007
    Location
    New Delhi, India
    Posts
    314
    Vote Rating
    0
      0  

    Default

    thanx.... and sorry for the late reply.... actually I lost track of this post

Similar Threads

  1. Populating Array Grid with one column hidden
    By rahulmca1@gmail.com in forum Ext 1.x: Help & Discussion
    Replies: 5
    Last Post: 16 Feb 2007, 8:15 AM
  2. Hidden Column Headers
    By willpage in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 16 Jan 2007, 3:05 PM
  3. Problem with creating buttons within hidden element
    By philf in forum Ext 1.x: Bugs
    Replies: 1
    Last Post: 9 Jan 2007, 9:25 PM
  4. Replies: 2
    Last Post: 20 Dec 2006, 6:48 PM
  5. EditGrid hidden column
    By anakreon in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 25 Oct 2006, 2:05 AM

Posting Permissions

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