Results 1 to 4 of 4

Thread: Ext.grid.Panel forcefit=true and Ext.state.Provider column width undefined

  1. #1
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    20

    Default Ext.grid.Panel forcefit=true and Ext.state.Provider column width undefined

    Hello,

    I've set a provider for the state manager via:

    Ext.state.Manager.setProvider(new Ext.state.ServerStorageProvider());

    and

    I've got a grid that I'm creating with:

    global.ticket.grid = Ext.create('Ext.grid.Panel', {
    ...
    store: global.ticket.store
    });

    in the provider, I'm doing:

    set: function(name, value) {
    //TODO: Set the state on the server
    console.log("Set storage value for: " + name + " to:");
    console.log(value);
    }

    and in the console log, I'm seeing something similar to what's below for all visible columns:

    Object { id="h2", hidden=false, sortable=true}
    hidden false
    id "h2"
    sortable true
    width undefined

    and for hidden columns, I'm getting:

    Object { id="h14", width=125, more...}
    hidden true
    id "h14"
    sortable true
    width 125

    However, when setting up the grid I've defined widths for all columns. Anyone have any idea why the width for the visible columns is coming over to the provider as undefined and how to solve that?
    Last edited by snoorani; 2 Jun 2011 at 8:15 AM. Reason: Accidentally posted before finishing post

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

    Default

    I think it's a bug in the state get and apply on grid.

    forceFit means that columns do not have a width, rather they have a flex config, and are managed by the layout of the header container (which is an HBox layout and can process flex configs)

    State getting and applying needs to consider flex (which it did not have to do in 3.x, so the ported over state code is incomplete)

  3. #3
    Sencha User
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    THis will be fixed in the next release.

  4. #4
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    20

    Default Next release date

    Thanks for the quick reply; it's good to know I wasn't going crazy and just doing something completely wrong. Would you guys happen to know when the next release will be? That'll give me some idea of how to proceed.

Posting Permissions

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