extjs4.1

How to set EXTJS Combobox label width

家住魔仙堡 提交于 2019-12-12 03:19:10
问题 I am trying to get the label for the combobox to show correctly in the example below. I am trying to get it to work in Sencha Fiddle. The text if too long, is getting truncated. Ext.application({ name : 'Fiddle', launch : function() { // The data store containing the list of states var states = Ext.create('Ext.data.Store', { fields: ['abbr', 'name'], data : [ {"abbr":"AL", "name":"Alabama"}, {"abbr":"AK", "name":"Alaska"}, {"abbr":"AZ", "name":"Arizona"} //... ] }); // Create the combo box,

Extjs filtering is not Working properly

孤街浪徒 提交于 2019-12-12 03:14:33
问题 I am new to ExtJS. I have written a code for applying filtering in a Grid, but it is not working properly. Attaching the code snippet which I have written for applying filtering. Without filters, the grid is properly displayed at the panel. Ext.create('Ext.data.Store', { storeId: 'userDetailsStore', fields: ['username', 'firstname', 'lastname', 'role', 'activeuser'], data: {'items': [ {"username": 'USER1', "USER1-firstname": "firstname", "lastname": "USER1-lastname", "role": 'Admin',

Add tip text dynamically to a slider

对着背影说爱祢 提交于 2019-12-12 02:06:51
问题 In my project, I am trying to add the tip text (config) dynamically to a slider. How to do that? I need to add it dynamically because I am generating the array of variables in a "Controller", which holds the text for each value of the slider (for tip text). var slider = Ext.getCmp('slider') slider.setTipText(arrayOfVariables) //What should I do here instead? There is no such method like setTipText in docs. What should I use then? EDIT : { xtype:'slider', animate: false, //plugins: [Ext.create

posting form to iframe with extjs without rendering to bidy

≯℡__Kan透↙ 提交于 2019-12-12 01:07:49
问题 I am trying to post a form to an iframe. my issue is that my form gets posted just fine when I render the iframe to body. But the issue with this is that the container displays at the bottom of the page instead of the place where I want it to show. If I don't use the renderTo property, my form never gets posted to iframe at all. It almost seems like that in the case when I do not use renderTo property, i think my form does not even see the iframe. here is my code thats working for the form

I want to show node value in extjs 4 line chart

一个人想着一个人 提交于 2019-12-11 23:22:02
问题 When we take mouse on line chart node then it is showing nodes values. Same thing i want to permanently without pointing to node. My complete code is: items:[{ xtype:'displayfield', value:'Avg. Freight Percentage' },{ xtype: 'linechart', store: store30DaysTo180Days, xField: 'days', height:200, yField: 'averageFreightPercentLast', xAxis: new Ext.chart.CategoryAxis({ title: 'In Days', }) }] 回答1: The config label is for this purpose. Try something like: series: [{ type: 'line', axis: 'left',

Extjs 4 dateField getValue

百般思念 提交于 2019-12-11 20:33:12
问题 I feel should be easy but still does not work, "toDate.getValue();" does not return Ext.date object. I cannot format date. Error: format is undefined. Below is my form field. var toDate = new Ext.form.DateField( { fieldLabel: "date" value: new Date(), name: "abs-to-date", width: 100, allowBlank: false } And on submission of form, i want to format date. var toDateTime = toDate.getValue(); console.log(toDate.getValue()); toDateTime.setHours( toHour.getValue(), toMinute.getValue(), 0 ); abs.to =

Making a panel in border layout to float over center panel

懵懂的女人 提交于 2019-12-11 19:43:07
问题 I am using border layout in ExtJs 4 wherein the east panel is a collapsible panel. When I expand the panel it forces the center panel to adjust (shrink). Similarly When the east panel is collapsed the center panel retracts. The desired behavior is that when I expand the east panel it should float over the center panel and not force it to adjust itself. How can I achieve this? 回答1: Set the floatable: true config option on the east panel. See also the Border layout example. 来源: https:/

connect json with extjs

南笙酒味 提交于 2019-12-11 16:34:14
问题 In my sample login form, I am trying to connect to json and get the result ie., true, if username and password matches, else false. json ( exists in my project folder ) { "form": { "login": [ { "username": "venkat", "password": "123" }, { "username": "admin", "password": "345" } ] } I created a function like below. But I don't know what to do next. The sencha documentation has methods like ajax, proxy for MVC architecture, which I am not using. function checkJson(username, password){ //What

ExtJS 4.1 GridPanel missplaced column

点点圈 提交于 2019-12-11 16:22:45
问题 I have a GridPanel, but, as you can see, the first column(which is locked ) is not aligned like the other ones. Is it a bug, or am I doing something wrong? EDIT: Here are some snippets regarding the columns: initComponent: function(){ this.renderTo = this.divId; this.status = "normal"; Ext.Array.insert(this.columns,0,this.cols); this.columns = this.cols; this.callParent(); } and the cols object looks like this: for(var i in params){ if(i != config.staticColumn) cols.push({header: headers[i],

How to set an extjs grid record phantom to true

谁说胖子不能爱 提交于 2019-12-11 13:12:10
问题 In Ext 4.1, I am dropping items to a grid, but the records come in with an id and the phantom flag is set to false, causing the store to remain empty and not add those records to it. even though they appear fine on the grid. I read several solutions online, and many suggested setting the phantom flag to false and/or setting the id to null, but I am not able to implement this? Where do I set it? Here are related links: http://www.sencha.com/forum/showthread.php?261174-Store-is-not-syncing