我有一些默认的最小和最大限制数量编辑文本框中道场增强的数据表格。 我需要改变的制约,一旦电网完全加载。 请指教相同。 下面是代码片段,其中i已应用默认约束为min 0和最大值100。
- 是否有可能建立从数据存储领域即MINAGE和MAXAGE而定义布局的最小和最大限制值?
如果没有是可以更新这些默认限制?
require(["dojox/grid/cells/dijit","dojox/grid/DataGrid"],function() { window.masterlayout = [ [ {'name' : 'Employee Name',styles:"word-wrap:break-word;", 'field' : 'msisdn',editable : false}, {'name' : 'Min Age','field' : 'minAge' ,styles:"word-wrap:break-word;",editable : false}, {'name' : 'Max age','field' : 'maxAge' ,styles:"word-wrap:break-word;",editable : false}, {'name' : 'Age', 'field' : 'age', 'editable': true, singleClickEdit :true, 'alwaysEditing': false, styles:"word-wrap:break-word;", autoSave : false, type:dojox.grid.cells._Widget, widgetClass: dijit.form.NumberTextBox , widgetProps: {required: true }, constraint:{min:0,max:100,places:0} , formatter : function(item, rowIndex, cell) { var html = '<a href="javascript:ageLimitStatusGrid.edit.setEditCell(ageLimitStatusGrid.getCell(3),'+rowIndex+');">'+item+'</a>'; return html; } } ] ]; }); var url = "Test URL"; dataStore =new ServerSideStore({target:url}); ageLimitStatusGrid = new EnhancedGrid({ store: dataStore, structure: masterlayout, selectionMode : 'none', autoHeight : true, //autoWidth : true, autoRender : true, queryOptions : {'deep' : true}, noDataMessage : '<span class="dojoxGridNoData">No Data found</span>', loadingMessage : '<fmt_rt:message key="clls.loading.message"/>', rowsPerPage: 5, baseClass: 'balance_list', plugins: { pagination: { pageSizes: [],maxPageStep: 5, description: true, sizeSwitch: true, position: "bottom" } } }, "ageLimitStatusGrid"); ageLimitStatusGrid.startup();