Login Register

add

Dynamically adding items to FilteringSelect

Hello all,

I have a FilteringSelect which I have created from markup like so

<select dojoType="dijit.form.FilteringSelect" id="cmb1">
        <option value="1">aaa</option>
        <option value="2">bbb</option>
        <option value="3">ccc</option>
</select>

and now I want to add an Item dynamically to this list on the click of a button. I have tried the following.

var combo = dijit.byId("cmb1");
combo.store.newItem({text:"ddd", value:"4"}, null);

but I get the error "combo.store.newItem is not a function" in firebug.

Adding extra column to grid

Hi,
i'm trying to use dojox.grind for displaying data.
Everything works fine until i try to dinamically add columns to the table.
I need to add some columns and then refresh the table, then change the extra columns and refresh the data again.
When i need to rebuild the table header i acquire the base structure in json format from a file, then i add to it the extra columns.
The array composed by base structure + extra columns is passed as argumento to setStructure. So on it works, i see the new columns.

Syndicate content