PDA

View Full Version : value disappearing in the combobox



kamalakarreddy vancha
4 Nov 2014, 5:34 AM
Hi...
here i created a combo box with one keyword stateful:false,
when i use stateful:true in my grid it will disply in the grid like image 1.
when i enter the value in combo box it fires the url and displays the values based on word i typed in the combo.
if not exist i am able to enter the new value in the combo box like image2.
This functionality is working fine in one screen.


If i go to other screen mean
i created one more grid and i added stateful:true to this grid.
Here it is displaying fine.
But when i tried to enter the value in this combo...
then if the value exists in the combo it will display as per my requirement.
Upto its working fine.
If not exist the value what i am entering it will allow the new value.
But..
here only am facing the problem...
that is i enterd value and i tabbed out from the combo then the value is disappearing.
Here is my code...


configureStateButtons:function(){
var me = this;

me.tbar = me.tbar || ['->'];

var Store = {
model: 'GridStateModel',
url: 'gridstate/getGridStateDtls',
paging: true,
listeners: {
beforeload: function () {
this.proxy.extraParams.gridId = me.gridId || me.id;
}
}
};
var descr = {
xtype: 'mycombobox',
labelWidth: 100,
width: 300,
name: 'gridCd',
itemId:'gridCdItemId',
displayField: 'gridCd',
submitValue : true,
valueField: 'gridCd',
storeObjCmc: Store,
fieldLabel: Modules.LblsAndTtls.keywordLbl,
columnsCmc:[{
header:'grid State',
width:80,
dataIndex:'gridCd'
}],
validateSuccessFuncCmc: function (serverRespOjbData) {

return true;
},
validateFailFuncCmc: function () {
return true;
}
};
Ext.Array.insert(me.tbar, me.tbar.length, [descrCmc]);
}

Help me in this...






Thanks
Kamalakar Reddy

slemmon
7 Nov 2014, 12:55 PM
From your code snippet nothing is jumping out at me.
Are you able to share a test case that demonstrates the issue? You can post a working test case to https://fiddle.sencha.com.

kamalakarreddy vancha
10 Nov 2014, 2:01 AM
Thanks for your reply..
in my code i only did the mistake..
i.e.
I missed to provide the validateurl in my combo box.
thats why it is not allowing the value which i passe.
If i provide the value then it is allowing the value what i am giving....
and i wrote the condition in failure case of combo to allow the new value if not exist the value i entered...


Thanks
Kamalakar