Menu
  • HOME
  • TAGS

I can't find an easy way to access a dGrid Store

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....

How to call an event when the dojo dgrid has been rendered completely?

dojo,dgrid

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...

Dgrid formatter create column based on values in another column

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'; } } } ...

Dgrid - Firefox breaks while trying to load large data set in dgrid

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...

Is Drag and Drop possible in Dgrid without using store

dojo,dgrid

Yes, the way the DnD extension is written, it expects to be used with a store.

I can't find an elegant way to add a Database Source to a dgrid

javascript,dojo,grid,dgrid

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...

DGrid - Single Selection Mode while using Drag and Drop -> Results in multiple selections

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.

Dojo Dgrid - Use remaining space in block

css,dojo,dgrid

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:...

Vertical scrollbar with a dojo OnDemandGrid

dojo,usability,dgrid

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 in a custom widget

javascript,html,dojo,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...

DGRID - give numeric value for multiple Characters in field

javascript,dojo,dgrid

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...

color dgrid cell based on cell value

javascript,css,dojo,dgrid

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...

Dgrid and Django Rest Framework (JsonRest)

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...

dojo dgrid with store from url (json data) reload/refresh button

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...

OnDemandGrid column sorting isn't working with dstore/Rest and Django Rest Framework

dgrid,dstore

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...

Add row to start of Dgrid instead of end using Rest call

rest,dojo,dgrid

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....

Is dgrid-0.4 expected to work with dstore-1.1?

dgrid,dstore

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...

dgrid 'Object doesn't support this action; when attempting to render columns

dojo,dgrid

There was an interference with another package that I was pulling in causing the type of grid to be incorrect.

dgrid 0.4.0 tree looks flat before user interacts

dojo,tree,dgrid,dstore

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()....

Using dgrid/dstore's REST store with a filter

dojo,dgrid

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...

dgrid / dstore / Rest - How to add additional query parameters to request

dojo,dgrid,jsonreststore

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...

How to fix TypeError: transform(…) is null

dojo,dgrid

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...

Dojo grid refresh and scroll position

javascript,dojo,dgrid

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 })).

Dgrid - Display label for number (i.e. 02 = Cat) I want to display Cat - not the number

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:...

Django - Dojo/Dgrid - how to manage LARGE data sets

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...