Results 1 to 2 of 2

Thread: Strange top bar in IE and grid sorting problem

  1. #1

    Exclamation Strange top bar in IE and grid sorting problem

    Hi,

    I've developed an editor grid + form Ext 3.0 script with CRUD and Search functions for a php+MySQL backend application. It was working fine with editor grid columns sortable at the beginning.

    I ported this script to other application, in which I needed to change somethings as follows:
    1. change some field names and add and remove some fields.
    2. Add field level pull-down menu for two fields at the editor grid row.
    3. For the pull-down menu, I added two simple array stores to the script. The array stores get Json array data by javascript variables created on the fly by php before the grid is created.

    The porting is basically working fine with all CRUD and new field level pull-down menu working ok. There are no any javascript error found by IE 8, Firefox and google Chrome.

    However, after testing, I found some strange things:
    1. The top bar height is incorrect (shorten) in the grid (see grid1 image ) in IE8 but it is correct after I click any button (e.g. Search) on the top bar (see grid2 image ). No such problem found in other browsers e.g. Firefox, Chrome and Opera. (see grid3 image ).

    2. The visual height of the grid is slightly shorter in IE8 than other browsers (Firefox and Chrome). The grid height value is fixed and same in the script for all browsers.

    3. The column sorting is not allowed (the Ascending and Descending sorts are disable) in any browser (IE8, Firefox and Chrome..etc) but it was working fine before the porting. I have not changed the following statement in the script, which should enable the column sorting in the grid.

    // by default columns are sortable, colMod is the Column Model
    colMod.defaultSortable = true;

    Since there is no any javascript error, I don't know what is wrong with my porting script or there may be some hidden bugs in my script or Ext 3.0 column sorting method.

    Hope to get some advices.

    Thanks
    Attached Images Attached Images
    Benny

    Right Station
    Web Solution
    www.rightstation.com

  2. #2
    Ext JS Premium Member
    Join Date
    Aug 2007
    Location
    Austin, Texas
    Posts
    24

    Default

    Try moving the sortable declaration to the ColumnModel's config. We're having the same problem with defaultSortable. There's code there to catch it but it doesn't seem to be working in our case either.

    Try something like this...

    var colModel = new Ext.grid.ColumnModel({
    columns: [
    { header: "Name", id: 'name'},
    { header: "Favorite Pizza" },
    { header: "Likes Root Beer?", resizable: false}
    ],
    defaults: {
    sortable: true,
    width: 120
    }
    });
    Not sure about the topbar and height issues.

Posting Permissions

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