Results 1 to 7 of 7

Thread: xtype: 'grid' in dockedItems is not working

  1. #1
    Sencha User
    Join Date
    Aug 2011
    Posts
    8
    Vote Rating
    0
      0  

    Default Answered: xtype: 'grid' in dockedItems is not working

    Hi,

    I have got a Panel (from Ext.grid.Panel) and in the dockedItems I try to use an xtype: 'grid'.

    If I use 'panel' instead, there is no error message. If I use 'grid' on the same xtype, there is the message 'component is undefind'

    Code:
    Ext.define('my.view.vPanel', {
        extend: 'Ext.grid.GridPanel'
        ...
        , dockedItems: [{
            xtype: 'grid'
            , columns: ['name', ...]
            ...
        }]
        ...
    I like to create a summary row between a grid. I created it in an mvc.

    regards
    Lars

  2. How can I render that outsite.
    This is purely for diagnostic purposes. Ignore all the rest of your code, just grab the config for that grid and instantiate it using Ext.create. Shove in a renderTo: Ext.getBody() and a width and height if you don't have them already. The key thing is whether or not the config works outside of the docked items.

    The full stacktrace from Firebug would be very helpful. Also, which ExtJS version are you using?

    The line that's blowing up is in Ext.Component.create. It seems that component is undefined. Given everything you've described, this suggests that there's a problem with your grid config (possibly the columns?). The reason panel works fine is because it uses different config options so a mistake in, for example, the columns wouldn't affect it.

    So far the only way I've managed to reproduce this error message is by adding a load of stray commas into the dockedItems array. However, that would also fail with a panel. Can you just check all your arrays are fine and you don't have any doubled or stray commas?

  3. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,551
    Answers
    3931
    Vote Rating
    1271
      0  

    Default

    try 'gridpanel' as the xtype.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  4. #3
    Sencha User
    Join Date
    Aug 2011
    Posts
    8
    Vote Rating
    0
      0  

    Default

    sorry, it's still the same: component is undefined

  5. #4
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,790
    Answers
    583
    Vote Rating
    391
      0  

    Default

    Just tried it myself, 4.0.2 and 4.0.6. Worked fine.

    Which browsers are you seeing this in? If it's just IE then I bet it's a stray comma.

    If it's happening in all browsers then I'd suggest trying to render that docked grid outside of the docked items. I suspect you'll find it's a problem with the grid config rather than docking.

  6. #5
    Sencha User
    Join Date
    Aug 2011
    Posts
    8
    Vote Rating
    0
      0  

    Default

    Hi, I am using FireFox and Safari. In Safari the text ist a little bit differente but it says the same: TypeError: 'undefined' is not an object (evaluating 'component.xtype')

    How can I render that outsite. I try to have these grid as an seperate row on the end of an other grid. To use these place with a toolbar it's working fine, and if I declarate it as panel it's also working fine. What should be the problem that a grid is undefined.

    In a different arrangement where I don't use mvc it's also working fine. So maybe I have a problem with my mvc.

    My problem is I don't understand why panel should be defined and a grid and gridpanel not.

    I tryed also to create a varible of a grid and declarate an alias: widget.nameofgrid and liked to use xtype: nameofgrid - the same.

  7. #6
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,790
    Answers
    583
    Vote Rating
    391
      0  

    Default

    How can I render that outsite.
    This is purely for diagnostic purposes. Ignore all the rest of your code, just grab the config for that grid and instantiate it using Ext.create. Shove in a renderTo: Ext.getBody() and a width and height if you don't have them already. The key thing is whether or not the config works outside of the docked items.

    The full stacktrace from Firebug would be very helpful. Also, which ExtJS version are you using?

    The line that's blowing up is in Ext.Component.create. It seems that component is undefined. Given everything you've described, this suggests that there's a problem with your grid config (possibly the columns?). The reason panel works fine is because it uses different config options so a mistake in, for example, the columns wouldn't affect it.

    So far the only way I've managed to reproduce this error message is by adding a load of stray commas into the dockedItems array. However, that would also fail with a panel. Can you just check all your arrays are fine and you don't have any doubled or stray commas?

  8. #7
    Sencha User
    Join Date
    Aug 2011
    Posts
    8
    Vote Rating
    0
      0  

    Default

    Hi skirtle,

    thank you to gave me new idears. I got it, my header for the grid was wrong. Now I have a grid in the dockedItems.

    Thank you.

Tags for this Thread

Posting Permissions

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