dgrid

Dgrid set focus on cell

主宰稳场 提交于 2019-12-10 15:27:38
问题 I am using dgrid for displaying data in grid format , it has four columns. all are editable I have used following way to declare it. <table id="grid" data-dojo-type="dgrid.CustomGrid" data-dojo-props="store: memoryStore"> <thead> <tr> <th data-dgrid-column="dgrid.editor({ field: 'id' }, dijit.form.TextBox, 'click')">ID</th> <th data-dgrid-column="dgrid.editor({ field: 'name' }, dijit.form.TextBox, 'click')">Name</th> <th data-dgrid-column="dgrid.editor({ field: 'description' }, dijit.form

dojo editable-tree-dgrid : create or generate a new row supported in the dojo.store.JsonRest?

送分小仙女□ 提交于 2019-12-04 02:11:27
问题 I am trying a dojo-dgrid which is both Tree and Editable. In that I have the requirement as follows, I have a Add Button/Icon in a column(usually last column) for the parent rows. On clicking that Icon, a new Child-row should get generated/created (like store.newItem()) under this parent Row and this child row should be editable (there are 11 columns out of which 6 are editable,3 of them are digit.form.Select and the other 3 are Text-fields). Upon filling the editable areas , (there will be a

Using Dojo's dgrid, JsonRest and subrows/arrays

这一生的挚爱 提交于 2019-12-02 09:17:48
问题 I have a grid that I am creating drawing off a JSON data source that is formatted like this: {"recordsReturned":10, "totalRecords":471, "startIndex":0, "sort":"num", "dir":"asc", "pageSize":100, "visitors":[ {"num":1, "uid": "1", "ipaddress": "24.217.129.98", "hostname": "", "referer": "", "useragent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/536.26.14 (KHTML, like Gecko) Version/6.0.1 Safari/536.26.14", "date":1352086661000}, {"num":2, "uid": "0", "ipaddress": "100.43.83

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

北战南征 提交于 2019-12-02 05:41:19
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 help in advance. The returned JSON ( collection: new Rest({target: '/api/events'?format=json'),}) )

Dojo dGrid header checkbox to select all does not work

廉价感情. 提交于 2019-12-02 04:31:18
I created a dojo dgrid however i used a form wizard to seprate the fields on the form, however with the current structure i am having an issue with the select all feature on the grid. I cannot select all however if i remove the div Page2 and it content from the form it works. In firebug i also inspected the DOM and i saw the 'aria-checked = mixed' when i check the select all box when it should be 'aria-checked = true'. How can i get the header checkbox to allow all records to be selected when it is checked and the grid is in a Wizard form. Under is some screen shots and code: jsp <div data

dgrid 0.4.0 tree looks flat before user interacts

走远了吗. 提交于 2019-12-02 04:10:58
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:true}); store.add({node:'thesis', id:3, parent:1, hasChildren:false}); store.add({node:'game', id:4,

Using Dojo's dgrid, JsonRest and subrows/arrays

£可爱£侵袭症+ 提交于 2019-12-02 03:01:24
I have a grid that I am creating drawing off a JSON data source that is formatted like this: {"recordsReturned":10, "totalRecords":471, "startIndex":0, "sort":"num", "dir":"asc", "pageSize":100, "visitors":[ {"num":1, "uid": "1", "ipaddress": "24.217.129.98", "hostname": "", "referer": "", "useragent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/536.26.14 (KHTML, like Gecko) Version/6.0.1 Safari/536.26.14", "date":1352086661000}, {"num":2, "uid": "0", "ipaddress": "100.43.83.157", "hostname": "", "referer": "", "useragent": "Mozilla/5.0 (compatible; YandexBot/3.0; +http:/

How to query a dgrid on multiple columns

帅比萌擦擦* 提交于 2019-12-01 00:24:01
Is it possible to create a dgrid query that will search for a regex string on more than one column? Usually the syntax specifies {column1: "foo", column2: "foo"} but that will look for rows where both column1 AND column2 are "foo". But I want to use the same search string against both columns... is that possible and how would I do it? I need something like {column1 || column2 : "foo"}. phusick You can write your own function as I mentioned in my answer to your previous question Is it possible to filter data in a dgrid like you can in a datagrid ? Or you can use Resource Query Language (RQL) .

How to query a dgrid on multiple columns

℡╲_俬逩灬. 提交于 2019-11-30 20:08:55
问题 Is it possible to create a dgrid query that will search for a regex string on more than one column? Usually the syntax specifies {column1: "foo", column2: "foo"} but that will look for rows where both column1 AND column2 are "foo". But I want to use the same search string against both columns... is that possible and how would I do it? I need something like {column1 || column2 : "foo"}. 回答1: You can write your own function as I mentioned in my answer to your previous question Is it possible to

Is it possible to filter data in a dgrid like you can in a datagrid? If so, how?

主宰稳场 提交于 2019-11-30 09:50:08
I'm relatively new to dojo and have seen how datagrid offers a dynamic filtering capability that reduces the visible rows based on what you type into a filter text input. I have not found any examples of how to do it with the dgrid. If it can be done, please provide an example or point me to a resource that offers a tutorial or example. Thanks! phusick Yes, it is possible. Use dgrid/OnDemandGrid and define query function that will return true or false based on your logic for each row in dojo/store powering the grid. I prepared an example to play with at jsFiddle: http://jsfiddle.net/phusick