PDA

View Full Version : Multiselect list box



SwetaMishra
6 Jan 2011, 1:06 AM
var WinRoleAssigned;
var formRoleAssigned;
var UserInfo;
var CompanyInfo;
var RoleInfo;
var ModuleInfo;
var PermissionInfo;
var msForm;
Ext.onReady(function() {
msForm = new Ext.form.FormPanel({
title: 'MultiSelect Test',
width: 700,
bodyStyle: 'padding:10px;',
renderTo: 'multiselect',
items:[{
xtype: 'multiselect',
fieldLabel: 'Multiselect<br />(Required)',
name: 'multiselect',
width: 250,
height: 200,
allowBlank:false,
store: [[123,'One Hundred Twenty Three'],
['1', 'One'], ['2', 'Two'], ['3', 'Three'], ['4', 'Four'], ['5', 'Five'],
['6', 'Six'], ['7', 'Seven'], ['8', 'Eight'], ['9', 'Nine']],
tbar:[{
text: 'clear',
handler: function(){
msForm.getForm().findField('multiselect').reset();
}
}],
ddReorder: true
}]
});



WinRoleAssigned = new Ext.Window({
title : '<font color=#15428B size=3><b><center>Role Assignment</center></b></font>',
id : 'winRoleAssigned',
layout : 'fit',
width : 410,
height : 225,
resizable : false,
closable : false,
items : [msForm]
});
// winRegisterSubDiv.show();

// };

});

I am trying to use a multiselect list box in my form but it's giving error ...types[config.xtype || defaultType] is not a constructor.
Can u help me out ?????

arthas
19 Jan 2011, 1:38 AM
Hello!

The error is not an easy read, but it's due to missing JS files. The multiselect is not part of the core Ext, so you need to include:

MultiSelect.js

and also MultiSelect.css

which you can find in examples/ux.

Cheers,
Michele.