Search code examples
extjsextjs4extjs4.1extjs-mvc

ExtJS 4.2 RowExpander issue (second row is indented)


I'm trying to add to my grid the RowExpander plugin.

Seems everything was going great with just one row, but when adding a second row the following rows are indented.

I have created a Sencha Fiddle: https://fiddle.sencha.com/#fiddle/87d

I'm doing it exactly as Sencha Examples, maybe because I have a datetime column first I get that issue.

Any help is welcome.


Solution

  • You can't specify your component widget.dailytimesummary and then only add a plugin to it when you instantiate it or it won't get initialized as desired.

    Instead, your plugin should be a part of the initial definition of your widget:

    See your corrected jsfiddle here: https://fiddle.sencha.com/#fiddle/87m

    ...
    enableColumnHide: false,
    enableColumnMove: false,
    // this needs to be configured with the initial component
    plugins: [{
        ptype: 'rowexpander',
        rowBodyTpl: ['{Date}']
    }],
    selModel: {
        enableKeyNav: false
    },
    ...