extjs4

Extjs How can I change the 'style' of Ext.form.Label

橙三吉。 提交于 2019-12-11 05:17:17
问题 I know that I can set the style property of the label when creating it, but I want to change the style at run time, how can I do that? the user pick: font, color, bg color and I want to change the existing label style as user desire. thank you? 回答1: You can apply styles: yourFormPanel.getForm().findField("field_name").labelEl.setStyle({"color":"red"}); or add/remove css classes: yourFormPanel.getForm().findField("field_name").labelEl.addCls("red-label"); yourFormPanel.getForm().findField(

Change field labels on an ExtJS chart

怎甘沉沦 提交于 2019-12-11 05:12:12
问题 How would I go about changing the axes labels in an ExtJS chart? Specifically, I'm brining data in via proxy, and it's populating with the fields as they are labled in the database. I want to customize them, even if they have to be static. Here's the code from the ExtJS site: var panel1 = Ext.create('widget.panel', { width: 800, height: 400, title: 'Stacked Bar Chart - Movies by Genre', renderTo: Ext.getBody(), layout: 'fit', items: { xtype: 'chart', animate: true, shadow: true, store: store,

dockedItems - text from Panel

放肆的年华 提交于 2019-12-11 04:54:10
问题 I have Tree panel. everything works!; Ext.define('My.Tree', { extend:'Ext.tree.Panel', id: 'DriveTree', store: storeTree, ChooseButtonText: 'ChooseFolder', dockedItems: [{ xtype: 'toolbar', items: [{ text: 'BUTTON TEXT', // this.ChooseButtonText id:'connectButton', handler: function(){ alert(this.ChooseButtonText); } }, ] }], }); Ext.onReady(function(){ var tree =Ext.create('My.Tree', {}); }); But text of dockedItems want to be from Panel. something like this: text:this.ChooseButtonText each

adding item to window Extjs 4

独自空忆成欢 提交于 2019-12-11 04:34:41
问题 I've been digging my mind all this morning to find the solution to this, I have an Extjs window where I want to put a chart as an item. I'm using Extjs 4, here's my window : Ext.define('Metrics.view.ChartWin', { extend: ['Ext.window.Window'], alias: 'widget.chartwin', requires :['Ext.chart.*','Ext.Window', 'Ext.fx.target.Sprite', 'Ext.layout.container.Fit', 'Ext.window.MessageBox', 'Metrics.view.DrawChart'], width: 800, height: 600, minHeight: 400, minWidth: 550, hidden: false, shadow: false,

Extjs4 MultiLevelGrouping Grid and being able to print it

廉价感情. 提交于 2019-12-11 04:06:54
问题 I was trying to print an ExtJs grid and found rahul singla post: http://www.rahulsingla.com/blog/2010/10/extjs-printing-gridpanels-with-groupingview-and-groupsummary-plugin which led me to Ed Spencer Printer class, wich led me to Loaine's ExtJs4 version https://github.com/loiane/extjs4-ux-gridprinter which is absolutely great, so far so good, but the grid I'm trying to print has a multilevel groupingsummary feature for wich I used this UX http://www.sencha.com/forum/showthread.php?265814

Create event for arrow keys in extjs

余生长醉 提交于 2019-12-11 04:03:55
问题 How to get the char codes of the arrow keys in extjs? I tried the below code which is working good to get the char codes of all the keyboard buttons but not the arrow keys(also Backspace). Ext.getDoc().on('keypress', function(event, target) { console.log(event.getCharCode()) }); Before asking here, I have gone through the documentation which I can't understand. and also If I press backspace then the page is redirecting to previous page. I am planning to keep my own function in future on

Uncaught TypeError: Cannot call method 'insert' of undefined

我的梦境 提交于 2019-12-11 03:47:37
问题 im pretty new to extjs and having trouble with it i am using the browser-layout example for my application im trying to add a form grid to it i defined a new class but when i call my form grid i get this error Uncaught TypeError: Cannot call method 'insert' of undefined here is my code: Ext.define('Ext.app.myFormGrid', { extend: 'Ext.grid.Panel', alias: 'widget.formgrid ', myData: [ ['3m Co', 71.72, 0.02, 0.03, '9/1 12:00am'], ['Alcoa Inc', 29.01, 0.42, 1.47, '9/1 12:00am'], ['Altria Group

How to convert (or serialize) javascript data object (or model) to xml using ExtJs

强颜欢笑 提交于 2019-12-11 03:16:56
问题 How do I convert that instance to XML? I am working with ExtJs 4.2. I have an instance of an ExtJs model. How do I convert that to XML? I have an anonymous JavaScript object (with a couple of properties). I am not sure if the answers for both of the above is same. The XML will be sent as body to a POST operation against a third party web service. 回答1: Converting JSON to XML in JavaScript is blasphemy! But if I had to do it I would use: http://code.google.com/p/x2js/ 回答2: I haven't used this

Extjs Custom TreeGrid Row CSS

只愿长相守 提交于 2019-12-11 03:11:49
问题 Is there a way to apply Alternative row css on the child level of a tree grid? Currently the stripeRows config on the treePanel viewConfig just makes everything grey and white, but it is difficult to distinguish the child rows from the parent rows. Ideally I'd like to make the parent objects alternate colors one way and the child rows alternate colors another way. I was thinking of writing a function using the "getRowClass" method to manually update the row class. I was wondering if there was

Ext.window.MessageBox draggable false, error calling hide method

丶灬走出姿态 提交于 2019-12-11 03:07:22
问题 After creating an instance of MessageBox like this var msgBox = Ext.create('Ext.window.MessageBox',{draggable: false}); -actually draggable false was set through an override to Ext.window.Window, I'm putting it like this to make it easier to reproduce. - also I do prefer the singleton syntax but there are already a ton of instances created like this in the code I'm working on. msgBox.alert("I am a bug, try to close me to reproduce"); Trying to close this MessabeBox calls the hide method: hide