can anyone provide me way to add data in dojox.widget.SortList.
It add initial data from the JSON file ;
After that HOW can I modify, add , append , delet data from this List from JAVASCRIPT ?
thanks
Manjul
can anyone provide me way to add data in dojox.widget.SortList.
It add initial data from the JSON file ;
After that HOW can I modify, add , append , delet data from this List from JAVASCRIPT ?
thanks
Manjul
This is the code I'm using [EDITED TO REMOVE GeSHi COMMENTS]
this is the code Im using .....
the private _addItem adds
the private _addItem adds any new items found via the fire of onItem from the store. Not sure if ItemFileWriteStore handles that, but you could try pushing an object into the writeStore, seeing if onItem fires.
you can also just manually appened a new li to the containerNode, more than likely:
_addItem: function(item){ var node = document.createElement("li"); var text = this.store.getValue(item,this.key); node.innerHTML = text; this.containerNode.appendChild(node); },is all that is happening, so:
var node = dojo.doc.createElement('li'); node.innerHTML = "new manually added item"; var sl = dijit.byId("mySortList"); sl.containerNode.appendChild(node); sl.onSort();would probably work.