0

My requirement is that to disable a grid panel inside field set or grid rows on certain condition. The grid has more than 20 items and there should be a scroll bar to view all the elements of the grid. If I use disabled property of grid panel, then the scroll bar also gets disabled. But i need the scroll bar to be enabled, so that user can see all items of grid.

For above i coded with feildset autoscroll: true and layout:fit. But on disabling the grid panel, the scrollbar of fieldset also gets disabled because of layout:fit property of fieldset. Is there any way to achieve the requirement?

Code:

Ext.applyIf(this,  {
    border : false,
    frame : false,
    bodyStyle : 'padding:12px 15px 0px',
    labelAlign : 'top',
    columnWidth : 0.5,
    heigth : 350,
    layout : 'form',
    items: [{
        xtype: 'fields',
        id: 'fields',
        layout: 'fit',
        height: 321,
        autoScroll: true,
        title: 'Element list',
        items: mygridPanel
    }]
})
abatishchev
  • 98,240
  • 88
  • 296
  • 433
AJJ
  • 3,570
  • 7
  • 43
  • 76
  • 1
    Did you try wrapping the gridpanel in another panel that has autoscroll, so when you disable the gridpanel the outer panel is still active, so the scrollbar should still function? – gunnx Jun 25 '12 at 07:44
  • Thanks for your response. I tried with below code it works in firefox. In ie it throws run time error... – AJJ Jun 25 '12 at 08:06

1 Answers1

1

I've made up a small demo on jsFiddle for you to look at:

http://jsfiddle.net/CGtqp/

does this help you solve your issue?

gunnx
  • 1,229
  • 7
  • 16