dojox.grid

DoJo Enhanced grid updating constraints dynamically is not working

◇◆丶佛笑我妖孽 提交于 2019-12-13 03:45:28
问题 I have a DoJo enhanced data grid with editable number text box with some default min & max constraints. I need to change the constraints once grid loaded completely. Please advise on same. below is the code snippet, where i have applied default constraint as min 0 and max 100. Is it possible to set min and max constraints values from the dataStore fields i.e minAge and maxAge while defining the layout? If not is it possible to update those default constraints? require(["dojox/grid/cells/dijit

Setting Custom ItemTitle in pagination in dojo grid

≯℡__Kan透↙ 提交于 2019-12-11 19:42:37
问题 while using pagination in dojo grid 1.9, I am not able to change the itemTitle in current position section. I found some examples for setting itemTitle but not working in dojo1.9. Can anyone help me out of this? Link of example 回答1: me too, perhaps you can edit the file dojo1.9.1/dojox/grid/enhanced/nls/[your_lang]/Pagination.js 来源: https://stackoverflow.com/questions/18023185/setting-custom-itemtitle-in-pagination-in-dojo-grid

Dojo (1.9.1) datagrid does not render if not a direct child of body

送分小仙女□ 提交于 2019-12-11 19:19:27
问题 I have problems with rendering a datagrid in my custom widget. I was able to pinpoint the problem to this: datagrids that are not a direct child of the body do do not render correctly. Showcase: <!DOCTYPE html> <html> <head> <title>Problems with datagrid</title> <meta charset="utf-8"> <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.9.1/dojo/resources/dojo.css"> <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.9.1

How to filter dojo categorized treeGrid?

泪湿孤枕 提交于 2019-12-11 15:07:02
问题 I have dojo treeGrid that works fine. It shows projects with cost categorized by year. Also it shows totals. But when I try to filter it by one of column it mess up the grid (breaks categories and filter records improperly). Do I use grid.filter properly? I need to keep categorized structure but remove/filter certain records. Or should I refresh jsonStore somehow instead? //HTML <div id="treeGrid"></div> <a href="javascript:void(0)"> <span id='button1'>Filter</span> </a> //JavaScript var

Dojo Data grid with custom HTTP headers

牧云@^-^@ 提交于 2019-12-11 08:15:00
问题 I have DataGrid that connects to REST service. I need to pass some custom HTTP headers (Authorization and others) to fetch operation. How can I do that? Data store is JsonRestStore. 回答1: Better late than never... Here's a workaround; add this function at the beginning of the dojo.addOnLoad() method. dojo.xhrGet = function(args){// Workaround for Dojo's lack of support for custom headers args.headers = {userId:'xyz', requestedBy:'abc', requestedFrom:'123'}; return dojo.xhr("GET", args); }; 来源:

dojox.grid.DataGrid: how to access data from a click event?

删除回忆录丶 提交于 2019-12-11 03:03:52
问题 I'm using Dojo 1.5 (including dojox). I have a dojox.grid.DataGrid where each row represents a user. When I click a row, I want to redirect to a URL like /users/USER_ID. The user ID is one of the fields in the grid, so all I need to do in my onRowClick callback is to grab the user ID for the row that was clicked. The click event contains a rowIndex property, and, indeed, I found a (rather old) post elsewhere that suggested I should be able to do: var row = dijit.byId('grid').model.getRow(e

Set datagrid to show just 5 rows per page

£可爱£侵袭症+ 提交于 2019-12-11 00:13:57
问题 I am using DOJO for data grid presentation <div id="grid_log" dojoType="dojox.grid.DataGrid" store="log" structure="window.layout_log" queryOptions="{deep:true}" query="{}" clientSort="true" rowsPerPage="5"> </div> but problem is that grid_log doesn't show just 5 rows per page. What is wrong with this tag ? Why ignores rowsPerPage="5" ? 回答1: It's look like the rowsPerPage value isn't pages that are "viewed" - but rather, "virtual" pages. That is, the grid only renders portions of itself at a

How to change cell formatting dynamically

你离开我真会死。 提交于 2019-12-10 12:04:51
问题 I hava implemented a datagrid using dojo which get updated every 5 seconds. I use following code to update the datagrid. jsonStore.fetch({ query: {id:'*'}, onComplete: function(items, result){ dojo.forEach(items, function(item){ jsonStore.setValue(item, "time" , data.update[0].netchange); ..... 'data' is the new data i need to set to the grid which is an json object as follows var data = {"update":[{...}]} what I need to do if the netchage is negative i need set cell color to red. if

How do you conditionally style a cell in a Dojo data grid?

∥☆過路亽.° 提交于 2019-12-07 06:04:07
问题 Essentially what I want to do is to apply additional CSS classes to individual cells in a data grid based on the value of the cell. An example would be to color the text red when a dollar value is negative. The only solution I've found was to use the formatter of the column to create a string for a span that has the class based on the value passed in. I figure there has to be a better way. 回答1: When specifying the structure, you pass in an object that represents the widget configuration for a

How to Focus inthe First Cell of a Newly-Added Row in a dojox.grid.DataGrid

戏子无情 提交于 2019-12-06 07:17:09
问题 I am adding a new blank row to a dojox.grid.DataGrid, and want to focus in the first cell of the new row. I add the row by calling: var new_row = {}, attributes = store.getAttributes( items[0] ); dojo.forEach( attributes, function( attribute ) { dojo.forEach( attributes, function( attribute ) { new_row[ attribute ] = null; } ); } ); store.newItem( new_row ); I believe the following code will do the focusing: grid.focus.setFocusIndex( row_index, 0 ); grid.edit.setEditCell( grid.focus.cell, row