Login Register

items

Drag and Drop - Limit new items in container

[editor: moving to the appropriate forum…]

Today I was experimenting with the Drag and Drop functionality and I need some help. I have one container with some items and about 14 other containers without items (all with the dojotype: dojo.dnd.Source).

Now I want to limit the items in the 14 containers to 1, so that only 1 item can be placed in that container. If there is already a item in the container the user should move that first.

I've searched the forums and the tutorials but I couldn't find a way.
Hopefully someone can help me. Thanks in advance.

Wouter

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 items to programatically created tree

Hi all,

I have an xml dom from which i create an ItemFileWriteStore datastore, which I use as the Store for my Tree, which i also programatically create like so

var tree = new dijit.Tree({
                                        persist:false,
                                        store: store,
                                        id: "myTree"
                                }, this.dojo.byId("myDivInsideMyContentPane");

inside a ContentPane. So far so good, the Tree displays all the Items as Nodes correctly.

Now I add an Item to the root of my Store like so

Grid & ItemFileReadStore - Using modified JSON format

Hello,

I am currently in the process of trying to implement a grid using a JSON store. I have successfully done this with a JSON file that followed the ItemFileReadStore.js requirements of using an items array. I have recently been trying to figure out how best to use a custom JSON store hierarchy with my grid. The store looks like the following:


{
"top": [
{"id":1, "name": "Name1", "width":2,
"first":[
{"card":1, "circuit":7},
{"card":1, "circuit":8}

reordering nodes in a Tree

I am using an ItemFileWriteStore to store data for my Tree widget. How can I go about reordering the top level nodes in my Tree? This might be a question that deals more with the ItemFileWriteStore, if so, please move this post to correct category.

Thanks!

Syndicate content