I am connecting a dataStore to a url created by TurboGears (1.x) with a Kid templating system. The way turbogears exposes the controllers (the URIs), the same controller can supply the Kid generated template or JSON data, and that is controlled by the ContentType of the request. So, to get JSON returned, I need the content type of my dataStore request to be: "text/javascript". I see it is application/url-form-encoded (something like that) but I don't see how, or if it's possible to, change the dataStore contenttype.
dataStore
Can the ContentType of an dataStore be set?
- Login or register to post comments
- Read more
- Subscribe post
How can I know when the grid is ready or when the data store is ready
Hi,
Can I trigger a function when the grid is ready or when the grid's data store is ready when using a declarative grid?
I know that I can do it by using the grid and dataStore attributes.
for example something like this:
function isGridReady() {
var grid = dijit.byId('grid');
return (grid.rowCount == grid.model.store._arrayOfTopLevelItems.length && grid.rowCount == grid.model.data.length && grid.rowCount == grid.views.views[0].rowNodes.length);
}
Performing an action when a data store finishes loading
I'm trying to catch an event when my datastore finishes loading the data originally, but I can't seem to get it.
I need to modify some data (client side) before a grid uses the data.
I've tried connecting to the onLoad, onNew and constructor events with no success.
Here's my last attempt:
pdojo.addOnLoad(function(){
pdojo.connect( questionStore, "onNew", "test123");
});
function test123( )
{
- Login or register to post comments
- Read more
- Unsubscribe post
Large ItemFileReadStore, sort totally confuzled!
I have a grid using an ItemFileReadStore (actually same thing happens with a QueryReadStore and doClientPaging=true) with a moderately large (600 record x 9 field) dataset.
Performance stinks with Firefox, and is decent with Microsoft Internet Explorer, but that's not the issue.
When I click on a column header to reverse sort, the grid seems to be quite "confused". Scrolling causes even more confusion.
(See next response - I've editing this after adding sequential numbers to the dataset to get a better picture of what's happening.)
Grid Select All using QueryReadStore
I have a grid setup using a QueryReadStore as the datastore.
I implemented a select all feature by utilizing g_grid.selection.shiftSelect(0, rowcount).
where rowcount is set by the model's getRowCount.
This populates the selection array correctly. However when I loop through the selection array and start retrieving rows using g_grid.model.getRows, everything is fine until I get to a rowid for a row that hasn;t been fetched from the db yet. I see a get request fire off in firefox but I am guessing it must be asynchronous and not returning in time for my loop.
deleteItem on ItemFileWriteStore dosent work
We used
var fruitStore=new dojo.data.ItemFileWriteStore(data);
to create a store from a json tree data.
Later we deleted one item using...
fruitStore.deleteItem(item);
When we wanted to insert the item again at a different tree node , I get a data store exception.
--- > Error: newItem() was not passed an single-valued identity'
Dosen't the delete remove the object from the tree and the datastore ???
And also when we use
items = fruitStore.getValues(parentItem,"children"); ,
Using SnapLogic to provide data for the Dojo Grid: demo
We created a demo, http://demo.snaplogic.org/griddemo.html of the data mashup displayed in the Dojo Grid that uses a large data set and manipulates it entirely via SnapLogic framework. Data residing on the server or multiple servers is fed into SnapLogic's easy-to-create - either in GUI designer or Python - Pipelines that allow various manipulations and transformations (filtering, sorting, joining, etc.) and expose the results via RESTful interface.
Adding and Selecting new items to FilteringSelect
I have a Filtering Select that is created in the HTML, and I am populating it with one of 4 JSON dataStores. This seems to be working really well. What I want to do is to add an item as the first item in the FilteringSelect for each of the dataStores. The Item would have the label: "ALL" and value:"ALL". And I want that Item to be the selected item whenever I change the dataStore in javascript. Here is some psudocode....
var storeOne = new dojo.data.ItemFileReadStore({id:'storeOne',url: "/json/one.txt"});
