dojox.grid.datagrid

How to update enhanced grid with new data

妖精的绣舞 提交于 2019-12-25 05:18:14
问题 I have an enhnaced grid connected to a JSONRest and i have it populating after the grid starts up. I'm confused as to how to update the Grid store when a new query is performed, can anyone help ? var store = new JsonRest({ target: "rest/search" }); dataStore = new ObjectStore({ objectStore: store }); /*set up layout*/ var layout = [[ {'name': 'Name', 'field': 'col1', noresize: true, 'width': '100%'}, ]]; /*create a new grid:*/ grid = new EnhancedGrid({ id: 'grid', store: dataStore, structure:

dojo treeGrid aggregate not working after refreshing jsonStore

懵懂的女人 提交于 2019-12-25 02:13:09
问题 I have dojo treeGrid that shows totals for child items. Everything works fine. But if I replace/update store and refresh then aggregation doesn't work and all totals shown as NaN. What am I doing wrong? var layout = [ { cells: [ [ {field: "userName", name: "Name"}, {field: "childItems", children: [ { field: "debit", name: "debit"}, { field: "credit", name: "credit"} ], aggregate: "sum" } ]] } ] var jsonStore = new dojo.data.ItemFileWriteStore({ url: "<............>"}); var grid = new dojox

Get column index in onresizecolumn of declarative dojox.grid.datagrid

我与影子孤独终老i 提交于 2019-12-25 00:36:16
问题 In a declarative dojox.grid.datagrid, am using onresizecolumn in table tag. onresizecolumn="columnResize(this.id,this.cellIdx)" onresizecolumn calls a function. on resizing particular column i want to get the cellIdx. <div class="claro" id="eterte" name="dataGrid" onclick="getConnect('inner__eterte');setWidgetproperty(this.id,'xy','inner__eterte');" ondblclick="editCustomGrid(this.id)" onmouseup="setDocStyle(this.id)" style="height:200px; left:39px; position:absolute; top:251px; width:950px;"

dojo Datagrid filter select that allows user to select from a list of values in the column

强颜欢笑 提交于 2019-12-24 05:55:22
问题 I m using dojo datagrid which contains 2 columns "name" and "age" , the requirement is to provide the filtering option on the "name" column in the datagrid. so that user can search and select his/her name from the list of values ,by clicking on the header of the name column. Is there any option that need to set in layout for the same. can some one please help on this. var layout = [ {field: "Name", name: "Name", width: '200px' }, {field: "Age", name: "Age", width: '100px' }, ]; var

How to detect if a text-field needs to wrap in JavaScript/dojo?

亡梦爱人 提交于 2019-12-23 19:00:20
问题 I have a textfield in a grid in which I wish to turn off text wrapping, but display a tooltip with the full text if wrapping is required. So, how could I detect if a field needs to wrap? I tried to query the field's length, but it was either in em or in px based on if the user resized it. How could I get the wrapping status? 回答1: An option to detect if the text wraps - create (with jQuery, for instance) an invisible span with the same font settings and white-space: nowrap , set it's text to

How we can pass dojo EnhancedGrid Store items to spring MVC Controller and save in DB?

寵の児 提交于 2019-12-23 12:47:33
问题 My requirement is to do read, update, delete & insert operations of datas from DB using front end as DOJO & Spring MVC. I am able to fetch the records from db and display in DOJO Enhanced Grid(Editable Grid). On editing the grid data, I don't know how to send the Grid Store Items to my Spring Controller and Update/Insert/Delete in my DB. Here is the code I have tried to fetch the data from java controller to front end. Controller Class @RequestMapping(value="eiaProjectSummary", produces =

how to check dojo.datagrid loading completed? [duplicate]

自闭症网瘾萝莉.ら 提交于 2019-12-23 12:26:27
问题 This question already has answers here : How to determine if a dojo grid has finished loading? (4 answers) Closed 6 years ago . I have a dojo.datagrid in one of my pages. Datagrid and its store(by calling an URL) are created by declarative method. not by dynamic/programmatic. I need to execute a javascript method which displays a div(which requires few data from the datagrid) just below my datagrid. I should display the div only after my datagrid loading completed;not before that. I am

dojox.grid.DataGrid - onStyleRow needs update? (dojo 1.2.0)

女生的网名这么多〃 提交于 2019-12-22 00:42:52
问题 we are using a dojox.grid.DataGrid in a jsp. <script type="dojo/method" event="onStyleRow" args="inRow"> var grid = dijit.byId("someID"); var item = grid.getItem(inRow.index); if(item != undefined) { if(item.someAttribute == "1") { inRow.customClasses = "dojoxGridMYRow"; } else { inRow.customClasses = "dojoxGridRow"; } } if(aBoolean) { inRow.customStyles = "backgrund-color: #FFCC00"; } //dojox.grid.DataGrid.prototype.onStyleRow.apply(this, arguments); //grid.focus.styleRow(inRow); //grid.edit

dojox DataGrid onStyleRow works first time, then not again

倖福魔咒の 提交于 2019-12-18 09:34:53
问题 I am trying to make a legend using a DataGrid . My problem is, I want the text in the Datagrid to be colored. I use the onStyleRow function as outlined here: (http://dojotoolkit.org/reference-guide/dojox/grid/DataGrid.html) and it works the first time after deploying. The text in the DataGrid comes up red, but if i refresh or open try it on a different browser, the DataGrid text does not come up red, just the standard black. I was wondering, what I was doing wrong, Thanks, Here is my code: if

sorting dojox mobile ListItem against label

懵懂的女人 提交于 2019-12-13 12:51:19
问题 I want to sort dojox mobile ListItem by label alphabetically. The label in my DOM looks like: <div class="subject">Sort alphabetically against me only</div> <span class="bomtype"> don't sort against me. </span> I want to sort by the text in the label having class="subject" in ascending order. I am using Dojo 1.9.1. 回答1: You can use dojox/mobile/EdgeToEdgeStoreList or dojox/mobile/RoundRectStoreList, for instance: <ul data-dojo-type="dojox/mobile/EdgeToEdgeStoreList" data-dojo-props='store: