PDA

View Full Version : Hide/Show grid based on form completion



Tumac
9 Apr 2010, 8:35 AM
I have a grid that I want to hide/show or disable/enable based on some form information being saved first.

Currently I set the grid to "hidden:true" and I want to show it on my From Save routine. I am not sold on show/hide. If there is a way I can just disable the grid until the form is saved, then enable the grid once the header info is saved.

And in my form save procedure, I do this, but I am getting errors saying grid is undefined.

Can someone point me in the right direction to do this. My googles are not turning up what I am looking for.

Thanks in advance.




var form=this.getComponent('stockForm');
var delgrid = stockForm.getComponent('deliveryBuild');
delgrid.show();


The grid is on a form that is managed by this set of code. The manager calls the Form and then I call the form component and try to show it.

asp3ctus
9 Apr 2010, 9:10 AM
The grid extends panel component and has most of it methods and properties so you can call


delgrid.enable()
delgrid.disable();
Also you can set disables : true in grid config

Tumac
9 Apr 2010, 9:17 AM
I added this and my grid is nicely grayed out on render. Problem is I can still drag and drop onto it in the disabled state.

My enable function is still coming up "not defined" so, I must be calling into it wrong. Will keep working on that.