-
9 Dec 2012 7:08 AM #1
Answered: Panel/List not scrolling correctly
Answered: Panel/List not scrolling correctly
Hello,
I have a list inside a panel that will not scroll through the list. It only seems to scroll through the first "page" (for lack of a better word). Then it seems to pop back to the beginning when you lift your finger.
What am I doing wrong? Thank You.
Code:var listPanel = new Ext.Panel({ id : 'listPanel', renderTo:'modaldiv', floating : true, centered : false, height : 400, width : 500, layout : 'fit', modal:true, items: [{ xtype: 'list', id : 'List1', layout : 'fit', styleHtmlContent: true, emptyText: 'No Records were found ', showAnimation: { type: 'pop', duration: 250 }, store: tabStore, itemTpl: tpl, onItemDisclosure: function(record, btn, index) { var thisfield = Ext.getCmp(field); thisfield.setValue(record.data.SCKEY); listPanel.hide(); }, listeners:{ itemtap:function (record,x){ var thisfield = Ext.getCmp(field); thisfield.setValue(record.store.data.items[x].A@KEY } } }] }); listPanel.showBy(field); listPanel.show();
-
Best Answer Posted by davisty
This was caused by the div not being removed.
I had to remove the div and re-add it with each prompting.
var divmod = document.getElementById("modaldiv"); if (divmod) {
divmod.parentNode.removeChild(divmod);
var divmod = document.createElement("div");
divmod.id = "modaldiv";
document.body.appendChild(divmod);
}
if (!divmod) {
var divmod = document.createElement("div");
divmod.id = "modaldiv";
document.body.appendChild(divmod);
}
-
10 Dec 2012 9:07 AM #2
This was caused by the div not being removed.
I had to remove the div and re-add it with each prompting.
var divmod = document.getElementById("modaldiv"); if (divmod) {
divmod.parentNode.removeChild(divmod);
var divmod = document.createElement("div");
divmod.id = "modaldiv";
document.body.appendChild(divmod);
}
if (!divmod) {
var divmod = document.createElement("div");
divmod.id = "modaldiv";
document.body.appendChild(divmod);
}


Reply With Quote