随笔分类 - 【02】ExtJS
摘要:1. 文本靠右的问题: 解决方案:修改app.json中的配置,将ext-all-rtl-debug.js改为ext-all-debug.js, 参见:http://www.jeeboot.com/archives/1579.html
阅读全文
摘要:win = desktop.createWindow({ layout: "border", title: "会员列表", width: 800, height: 550, defaults: { border: false }, constrain: true, resizable: false, mini...
阅读全文
摘要:listeners:{render:function(field){Ext.QuickTips.init();Ext.QuickTips.register({target:field.el,text:'信息提示'})}}
阅读全文
摘要:xtype: "combo", fieldLabel: "插入", readOnly: true, mode: "local", store: (globel.Store = new Ext.data.Store({ ...
阅读全文
摘要:var filterFields = [ { type: "string", dataIndex: "StoreName" }, { type: "string", dataIndex: "Contact" }, { type: "string", dataIndex: "Tel" } ]; ...
阅读全文
摘要:C#中千分位问题 1、C#中用最简单的方法把数字(不含小数)转换为千分位格式:如1234567变成1,234,567方法:1234567.ToString("###,###") 或 1234567.ToString("N0")2、C#中把...
阅读全文
摘要:e.grid.getView().refreshNode(e.record.index); //刷新单行
阅读全文
摘要:1.错的例子sexCombo.on("afterrender",function(){sexCombo.setValue(sexStore.getAt(0).data.code);});我不知道在某些情况下是否可以,但是我的combo的store是这样赋值的 /// /// 查看...
阅读全文
摘要:function newGuid(){ var guid = ""; for (var i = 1; i <= 32; i++){ var n = Math.floor(Math.random()*16.0).toString(16); guid += n; ...
阅读全文
摘要:1 Ext.define('PMS.view.whm.dailyWarehouseManagement.suppliesInventoryPlan.EditSuppliesInventoryPlan', { 2 extend: 'Ext.window.Window', 3 a...
阅读全文
摘要:{xtype:'gridcolumn',text:'非正常项',dataIndex:'UnusualItem',width:60,hidden:me.extOptions.isUsual=='Usual'?true:false,editor:{xtype:'combobox',alias:'widg...
阅读全文
摘要:参见:https://github.com/ivan-novakov/extjs-upload-widget
阅读全文
摘要:【获取】1、Ext.getCmp('id');2、FormPanel.getForm().findField('id/name');3、Ext.get('id/name');//前提是FormPanel在界面上显示出来了。4.form.query('numberfield[name="smsplan...
阅读全文
摘要:1.{ xtype: 'sms_PostRequirementGrid', border: false, plugins: [{ ptype:'cellediting', clicksToEdit:1}2.{ header: 'PostDu...
阅读全文
摘要:【错误方法】设置name,用grid.down('name');设置id,用grid.down('#id');【正确方法】1.设置itemId: 用grid.down('#itemId')2.设置name,用grid.query('button[name="AddBtn"]')[0];【button...
阅读全文
摘要:1【TellPhone】8位数字 regex: /^(\d{3,4}\)|\d{3,4}-|\s)?\d{8}$/, regexText: 'the cellphone number is invalid !',2.【CellPhone】11位数字 regex: /^\d{11}$/, regexText: 'the cellphone number is invalid !',3.【邮箱】 vtype: 'email', //邮箱验证 v...
阅读全文
摘要:【方式一】1.弹出窗体的时候,传入参数,record。2.record.get(’name‘)这样给form里的控件赋值3.窗体验证 form.checkChange(); //这句话随时监听变化并验证 if (form.isValid())4.获得窗体上的值 var form = btn.up('tms_test02Window').down('form'); var values = form.getForm().getValues();5.修改之后,点击’保存‘按钮,时间里写:record.get('name')=values['n
阅读全文
摘要:1.【可选择行的Grid】 selModel: { selType: 'checkboxmodel' },这样就会成为可选择的grid【问题】:selModel与selType是什么关系?直接selModel:'checkboxmodel'行不行?2.【获取选中的行】var grid = btn.up('test_test02Grid');var rows = grid.getSelectionModel().getSelection();但是注意这里的rows[0]指的是第一个选中的行,而不是选中行的最上面一行。 var minIndex =
阅读全文
摘要:1.【代码】1 OnSave: function (btn) {2 var form = btn.up('tms_test02Window').down('form');3 var values = form.getForm().getValues();4 5 // alert(values[0]); //undefined6 // var arr = [];7 // Ext.each(values, function (item) { //item和value一样8...
阅读全文
摘要:【精华】 onEditTestInfo: function (btn) { //创建并弹出窗体 var grid = btn.up('test_test02Grid'); var rows = grid.getSelectionModel().getSelection(); if (rows.length == 0) { Ext.Msg.Show(iGeneral.iSeleteOneItem, iGeneral.iNote); return false; } else { Ext.create('TMS.Test.Test02Window', { record
阅读全文

浙公网安备 33010602011771号