jeudi 13 novembre 2014

Touch Grid Field Picker

I am attempting to use a picker for numeric input into a Touch Grid through the defaultFormConfig provided through the Editable Plugin. As many of you know, the Grid definition is used to configure the editors available for each field. I am configuring an editor in Architect to emulate the following...


Code:



// This works as standalone , but I need instructions on how to configure this in Architect 3.1
var picker = Ext.create('Ext.Picker', {
slots: [
{
name : 'oneHundreds',
title: 'Numbers',
data: [
{text: '1', value: 1},
{text: '2', value: 2},
{text: '3', value: 3},
{text: '5', value: 5},
{text: '6', value: 6},
{text: '7', value: 7},
{text: '8', value: 8},
{text: '9', value: 9}
]
},
{
name: 'tens',
title:'tens',
data: [
{text: '0', value: 0},
{text: '1', value: 1},
{text: '2', value: 2},
{text: '3', value: 3},
{text: '5', value: 5},
{text: '6', value: 6},
{text: '7', value: 7},
{text: '8', value: 8},
{text: '9', value: 9}
]
}
]
});
Ext.Viewport.add(picker);
picker.show();

However, the configuration I have for the Grid (In Architect), breaks the form field, here it is...


Code:



{
xtype: 'column',
editable: true,
itemId: 'casingPressure',
width: 110,
dataIndex: 'casingPressure',
editor: {
xtype: 'picker',
destroyPickerOnHide: true,
name: 'casing',
picker: {
slots: [
{
name: 'oneHundreds',
data: [
{
text: '1',
value: 1
},
{
text: '2',
value: 2
}
]
}
]
}
},
text: 'Casing Pressure'
},

My question is "How do I configure a Picker as an Editor for a Grid Field in Architect 3.1?



Touch Grid Field Picker

Aucun commentaire:

Enregistrer un commentaire