-
25 Apr 2012 2:01 PM #1
Answered: How To Add DataView to Panel
Answered: How To Add DataView to Panel
Hi Guys,
My goal is to have a dataview with a submit button. I created the dataview and can push it successfully to the view. I then tried to create a panel so that I could add the dataview and then a submit button to push that panel but only the submit button appears after pushing. Any ideas how I can fix this? Below is some of my code.
Code:var view = list.parent; Ext.define('MyListItem', { extend: 'Ext.dataview.component.DataItem', xtype: 'mylistitem', config: { nameButton: { }, inventory: { name: 'Prod_Desc' }, dataMap: { getNameButton: { setLabel: 'Prod_Desc' } }, layout: { align: 'center' } }, applyNameButton: function(config) { return Ext.factory(config, Ext.field.Text, this.getNameButton()); }, updateNameButton: function(newNameButton, oldNameButton) { if (oldNameButton) { this.remove(oldNameButton); } if (newNameButton) { this.add(newNameButton); } } }); var dv = Ext.create('Ext.DataView', { fullscreen: true, store: detailsStore, useComponents: true, defaultType: 'mylistitem' }); var submitBtn = Ext.create('Ext.Button', { text: 'Submit', ui: 'confirm ' }); var mainPanel = Ext.create('Ext.Container', { fullscreen: true, }); mainPanel.add(dv); mainPanel.add(submitBtn); view.push(mainPanel);
-
Best Answer Posted by mitchellsimoens
Remove fullscreen config from the Ext.DataView. You also need to not allow scrolling on the DataView and allow scrolling on the Container it is being set in.
-
27 Apr 2012 4:24 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 435
- Answers
- 3109
Remove fullscreen config from the Ext.DataView. You also need to not allow scrolling on the DataView and allow scrolling on the Container it is being set in.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.


Reply With Quote