dgrid

How do I connect a django rest framework json query result to dgrid/OnDemandGrid

老子叫甜甜 提交于 2019-12-20 05:14:27
问题 My JSON store (django rest framework) returns keys for "count", "next", "previous", and "results". "count" is the number of rows available. "next" is the url for the next page of results (e.g. ids 26-50). "previous" is the url for the previous page of results (null in this case since this is the first page of results). The "results" key contains the actual data objects I'd like to display in the OnDemandGrid. How do I connect the "results" key data collection to the grid? Thank you for your

dgrid 0.4.0 tree looks flat before user interacts

雨燕双飞 提交于 2019-12-20 04:53:32
问题 Trying to use dgrid 0.4.0 to display a tree structure. (no prior experience with previous versions 0.3.x). I built this sample with two folders : alice and bob ; each would have a few files (leaves) in it. The store ("astore.js") define(['dojo/_base/declare', './dstore/Memory', './dstore/Tree'], function(declare, Memory, Tree) { var store = new (declare([Memory, Tree], {}))(); store.add({node:'bob', id:1, parent:null, hasChildren:true}); store.add({node:'alice', id:2, parent:null, hasChildren

Dojo DataGrid (DGrid) Adding checkbox column

99封情书 提交于 2019-12-19 12:05:45
问题 I am using Dojo Dgrid however i am trying to add a checkbox column however i am not sure of the approach. Most of the tutorials i have been looking at follow a different code structure and i am unable to create the check box column. I would like to create a checkbox column to select rows Code (Here is also a Fiddle of my code) require([ ....................... "dojo/domReady!" ], function(parser, declare, Grid, ColumnSet, Selection, selector,Keyboard, DijitRegistry){ parser.parse(); var data

dojo dgrid multiple cells edit

Deadly 提交于 2019-12-18 12:49:12
问题 Is it possible to edit multiple cells of the dgrid at the same time ? I know that we can edit a single cell at a time by double/single clicking that cell and update it. And on the onBlur of that cell, the edited data gets updated for that cell. But my requirement is: click edit-link/edit-button for each row, which will display editors for the all the editable cells of that row, update/edit the cells, then click the save button(which will be next to the edit button) for that same row, on

Why will the headings in my dojo dgrid not appear unless I resize the browser?

99封情书 提交于 2019-12-13 00:39:21
问题 I've got a dgrid with headings that will not appear unless I resize the browser window. As soon as I resize the browser window, the headings appear. How can I get the headings to show up without resizing the browser? Am I not calling startup() correctly? Is there an event I can fire to make the dgrid think the browser has been resized? 回答1: Put add the DijitRegistry to the grid as shown here: https://github.com/SitePen/dgrid/wiki/DijitRegistry Put a dijit Container in your content pane (if

color dgrid cell based on cell value

前提是你 提交于 2019-12-13 00:26:03
问题 I've got a dgrid and I'm trying to set the cell background color based on the value of the cell using a formatter function and css. The dgrid is located within a div with ID UnMarkedTicketGridDiv formatter function: formatPriority: function (item) { return = "<td class='" + item + "'>" + item + "</td>"; }, css: #UnMarkedTicketGridDiv td.NORM { background-color:Green; color:Green; } Any idea why the cells arent getting colored green? I've verified the formatter function is being called, and

Running dojo dgrid : subrows is undefined

流过昼夜 提交于 2019-12-11 20:05:57
问题 I have tried implementing a class for a grid layout using dgrid (using their sample), but I get this error when loading my grid ( subRows is undefined ). My code looks something like this: define([ "dojo/_base/declare", "dojo/_base/lang", "dgrid/Grid", "dgrid/Keyboard", "dgrid/Selection" ], function( declare, lang, Grid, Keyboard, Selection ){ return declare([Grid, Keyboard, Selection], { columns: { first: "First Name", last: "Last Name", age: "Age" }, selectionMode: "single", // for

Saving a Dgrid JsonRest-based Store

夙愿已清 提交于 2019-12-11 06:24:47
问题 I have a dgrid that has editable date fields. Above it, I have a "Save" button that calls grid.save . When I hit the button, it makes an XHR request back to the store's target, but does not provide any data back to the server for me to save (i.e. POST is empty). Right now it is hardwired to query item id 1900, as you can see in the code below. Here is how the store is initiated: var store = new JsonRest({ target: "/safari/resources/1900/calendarObjects/", sortParam: "sort", idProperty: "id",

How To reset the OnDemandGrid

烈酒焚心 提交于 2019-12-11 05:42:15
问题 I am using OnDemandGrid with JSONrest store in my application.For the first time,the grid is loading fine , if i search again for other data,the data already in the Grid is getting overlapped with new data.Can someone tell me how to reset or refresh the OnDemandGrid? Here is my code, function (request, Memory, OnDemandGrid,JsonRest) { var jsonstore = new JsonRest({target: url,idProperty: "srno"}); grid = new OnDemandGrid({ store: jsonstore, columns: Layout, minRowsPerPage : 40, maxRowsPerPage

Non case-sensitive sorting in dojo dgrid

不问归期 提交于 2019-12-11 04:06:41
问题 Is it possible to sort without case-sensitivity? For instance, sorts by default show up like this: Awesomeman adam beyonce but, I'd like to sort like: adam Awesomeman beyonce Is it possible to override the sensitivity easily? From what I can tell the grid inherits from OnDemandGrid and OnDemandList , which both inherit from Grid and List . For my store, I am using Memory wrapped in Observable . As of now, I'm trying to overwrite _setSort in List.js , however that's not working. Anyone out