PDA

View Full Version : Problem witn Picker



alessiolu11484
25 Feb 2011, 7:45 AM
If i want to create a Picker without data and in a second moment add rows to it... how can i do?

I tried to create the picker with no data, data:null,data:[null]... and so on, but i have always the error
"DataView requires tpl, store and itemSelector configurations to be defined."

I can't believe there isn't a way to do it....

Someone can help me? Thank you ;)

irfaniqbal
7 Mar 2011, 4:56 AM
If i want to create a Picker without data and in a second moment add rows to it... how can i do?

I tried to create the picker with no data, data:null,data:[null]... and so on, but i have always the error
"DataView requires tpl, store and itemSelector configurations to be defined."

I can't believe there isn't a way to do it....

Someone can help me? Thank you ;)


you can do this like that:



pickerSlotArray = {
name: 'test',
title: 'Test',
data: {text: 'Value 1', Value: 'value'}
}

var Picker = new Ext.Picker({
slots: [],
listeners: {
beforeshow:function(picker){
picker.add(pickerSlotArray);
}
}
});
hope this helps.