javascript,dojo,frameworks,dgrid
if you can access the store you can simply do the following. var gridList= store.query(); console.log(JSON.stringify(gridList)); if you can show me more code i can help you more....
dgrid-refresh-complete is implemented specifically in OnDemandList and Pagination. If you're using the SingleQuery mixin instead (as in the tutorial for 0.3 or 0.4), it should be feasible to institute the same kind of event as follows: var self = this; // existing code from refresh... // when(...) (via dojo/when) should...
javascript,dojo,dgrid,dojo.gridx
I realized dgrid has a get function which i can use to access the datasource attributes. So formatter was not needed instead get was used. Under is my solution : Javascript }, addressType:{ label:"Address Type", get: function(object){ if(object.postalAddress == true){ return 'Postal'; }else{ return 'Business'; } } } ...
javascript,firefox,dojo,dgrid,broken-pipe
I don't really know what is wrong per sey, but I would imagine that you are having memory issues. I was using Gridx with about 15,000 rows and had lots of problems with memory until I implemented the JSONRest store. For so many rows, I would strongly recommend to use...
Yes, the way the DnD extension is written, it expects to be used with a store.
The simplest path forward is to write a service in your server-side language of choice (sounds like PHP in this case) that produces JSON output based on the data in your MySQL database. Depending on the potential size of your data, you can potentially design your data to work with...
javascript,dojo,dgrid,dojo-dnd
RE programmatic deselect, I think you've found a legit dgrid bug. I took a quick look at this and issued a pull request. See if that changeset resolves the issue for you.
One solution is to change the html to this: <div class="container"> <div class="someStuff">Some stuff of unknown height</div> <div class="containsDGrid"> <div class="myDGrid" data-dojo-attach-point="dgrid"></div> </div> </div> And then use CSS like this: .container { display: table; } .someStuff { display: table-row; } .containsDGrid { display: table-row; height: 100%; } .dgrid { width:...
Never mind my question - I realized that it was actually showing the vertical scrollbar by default all this while, but it was hidden off the right of the page due to a large width on the div containing the dgrid.
Dgrid tutorial shows the following note: When using the basic Grid module, the grid will be empty until you call renderArray. The more advanced store-based implementations like OnDemandGrid will populate themselves from the store automatically. I changed my Grid to OnDemandGrid which picks data from store automatically. Also calling renderArray...
Altered. function XXXXInfoFormatter(item) { var length = item.length; var i; var Wrongs = []; // Scan chars from right to left. for (i = length - 1; i >= 0; --i) { if ('!' === item[i]) { // If its a '!', put it id from Right to the Wrong...
Generally, the simplest way to do this would be to use renderCell, which gives you direct access to the cell: Priority: { label: "Priority", renderCell: function (object, value, cell) { cell.className += " " + value; return document.createTextNode(value); } } Note that renderCell can return a node to be placed...
python,django,dojo,dgrid,jsonreststore
This question has begun to morph, so I've formatted my answer a bit to try to match so it's still somewhat cohesive. Problem 1: dgrid version vs. store API in use dgrid 0.4 interfaces with dstore stores, not dojo/store, which is why you're ending up with no data displayed. dstore/Rest...
javascript,dojo,store,dgrid,dstore
Technically, to do what you want, you do need to update the local store, in a way. dstore/RequestMemory is essentially a composition of dstore/Request and dstore/Cache, where a single fetch request is performed immediately and then the caching store fields all future fetch operations. In order to force the store...
A quick search through the Django Rest Framework documentation reveals that it defaults to expecting an ordering query parameter to indicate which field should be sorted. The dstore/Request store (inherited by Rest) allows you to indicate the query parameter name that sends sort information, via sortParam. Additionally, it appears that...
I figured out what I did wrong. In dgrid/OnDemandGrid, I set the property "sort", which was causing the queryExecutor in Trackable.js to put the newly added row at the end instead of the beginning. So all I had to do was remove the sort property, and now it works fine....
At the time dgrid 0.4 was released, ~1.0 was listed as its dstore dependency in bower.json to safeguard against any potential breaking changes in 1.1+. However, in our testing with dgrid 0.4 and dstore 1.1, it should be safe to use, and we'll be updating the dependency listed in dgrid's...
There was an interference with another package that I was pulling in causing the type of grid to be incorrect.
As noted by Dylan and myself on the github issue with the same question, you need to pass a collection to your grid that only represents the top-level items. When using dstore/Tree, you can call store.getRootCollection() for this purpose. So instead of collection: astore, you want collection: astore.getRootCollection()....
In dgrid 0.4, instances using OnDemandList or Pagination can accept any collection - whether it be a root store, or a collection generated as a result of performing operations on that store. filter is one such operation. In your case you state you want the grid to always show only...
dstore's equivalent to dojo/store/JsonRest is dstore/Rest (however, if you don't have a compliant REST API on the server you may want to use dstore/Request). dstore's filter method allows you to make arbitrary queries. It returns a collection with any applied filters stored so that they can be included whenever fetch...
Got some assistance from SitePen. Here's the trace Stack - **string.substitute/<()string.js (line 147) string.substitute()string.js (line 141) ._updatePaginationStatus()Pagination.js (line 395) .gotoPage/ return transform(value, key).toString(); instrum...tion.js (line 20)** The Pagination was failing - potentially trying to pull data before it was actually there. "Code is trying to do a string.substitute call, but...
If you're using OnDemandGrid, it supports a keepScrollPosition property, which you can either define on the grid instance to influence all refresh calls, or pass specifically when calling refresh (e.g. grid.refresh({ keepScrollPosition: true })).
javascript,database,dojo,dgrid
You need to use the column formatter function for rendering data. check the jsfiddle over here. Check the examples over here I have taken this example and modified as per your needs. require([ 'dgrid/Grid', 'dojo/domReady!' ], function(Grid) { var data = [ { id: 1, number: 7 }, { id:...
mysql,django,dojo,django-rest-framework,dgrid
I don't know how to answer this on the layer between DRF and the database, but as discussed in other SO questions like this one, DRF allows you to limit the amount of data sent with requests via page or offset/limit parameters. Based on the phrasing of your question, it...