PDA

View Full Version : ComboBox Mult-Select within a Properties Grid



JaceyB
19 Aug 2014, 4:40 AM
Hi

I'm trying to use the ComboBox Multi-Select option within a properties grid and get


Uncaught TypeError: Cannot read property 'childNodes' of null ext-all-dev.js:31056

Does anyone know of a solution to the problem? Or will I have to move this input over to a form?

I'm using Ext JS 4.2.1.

Kind Regards
Jace

Code if needed:



weatherId: {
displayName: "Weather",
editor: Ext.create("Ext.form.field.ComboBox", {
store: STORES.weatherRecordStore,
valueField: "id",
displayField: "name",
editable: false,
queryModel: "local",
multiSelect: true
}),
renderer: function(value) {
if (Ext.isEmpty(value)) {
return "[UNSET]";
}

var weatherIds = value.split(",");

var weatherNames = [];

Ext.Array.each(weatherIds, function(weatherId) {
var weatherRecord = STORES.weatherRecordStore.getById(weatherId);

Ext.Array.push(weatherNames, weatherRecord ? weatherRecord.get("name") : "[ERROR]");
});

return weatherNames.join(", ");
}
}

Gary Schlosberg
25 Aug 2014, 3:27 PM
I don't believe there is an easy way to get a multiselect combobox to work within a property grid. You might have an easier time creating the functionality using a regular grid.