extjs

How to determine the selected cell of a Ext.grid.Panel in ExtJS 4?

我只是一个虾纸丫 提交于 2019-12-23 18:05:47
问题 how can i get the selected cell of a Ext.grid.Panel? In ExtJS 3 it was possible via: grid.getSelectionModel().getSelectedCell() In Ext 4 there is grid.getSelectionModel().selected but this only gives me the record. 回答1: There may be a more direct way to do this but the following seems to work for me: grid.view.getCellByPosition(grid.getSelectionModel().getCurrentPosition()); 回答2: I ended up needing the actual column that the user was clicking on and discovered the following: grid.panel

Latency issue for application on HTC ONE developed using Sencha Touch 2.1(Android 4.0.x)

一世执手 提交于 2019-12-23 16:40:47
问题 I have developed an application using Sencha Touch 2.1 Framework. The application being installed on the HTC ONE device running on Android 4.0.x version. It is observe that app's response time is very slow while 1. Traversing from one screen to another screen 2. While fetching data from server 3. After a tap on any icon, loading mask takes time to get displayed 4. Due to screen transition is taking time, the header of previous screen gets displayed on current screen momentarily and then only

Add Flex value dynamically to controller in extjs

谁说我不能喝 提交于 2019-12-23 16:34:42
问题 I am giving some items (containers), in "View", a layout of hbox . Now I want to give flex value to each item through the "Controller". How can I do this? I have gone through the docs but can't find any method like setFlex . EDIT : Ext.apply(Ext.getCmp('IdHere'), {flex: 1}); I have got the answer from this link. But now the problem is that even I am changing the flex values dynamically, the view of the containers is not changing. It is remaining same. I am not assigning flex values initially

Design sudoku using extjs

坚强是说给别人听的谎言 提交于 2019-12-23 16:34:31
问题 I am very new to extjs. I am trying to design sudoku game using extjs. Till now I have done the following: Ext.onReady(function() { var i = 0, items = [], childItems = []; for (i = 0; i < 9; ++i) { childItems.push({ xtype: 'container', height: 50, style: { borderColor: '#000000', borderStyle: 'solid', borderWidth: '1px', width: '40px' } }); } for (i = 0; i < 9; ++i) { items.push({ xtype: 'container', height: 150, layout: { type: 'column' }, style: { borderColor: '#000000', borderStyle: 'solid

Simply retrieving all records from a store

夙愿已清 提交于 2019-12-23 16:31:05
问题 Instead of retrieving a single row of data from my store, how can I modify the following code to retrieve all records? var store = Ext.data.StoreManager.lookup('MyStore'); store.setProxy({ type: 'pagingmemory', data: store.getAt(0) }); store.load(); Any thoughts? 回答1: You can use store.getRange() or you can use store.data.items . For the getRange() call, passing no parameters just defaults to 0 and the last record in the store. 回答2: I think this is not complete true, since getRange() will

How to make extjs accordion vertically scrollable

孤者浪人 提交于 2019-12-23 16:06:07
问题 fiddle here. If there are many panels in the accordion they vertically just start bumping up against each other and can't be expanded. I would like to make the total height of the accordion the height of the headers plus the height of one panel body (expanded). And then the parent panel should just have a scrollbar to show that amount of height. This way there is always an open accordion and you can scroll down to any header and instead open that one. Is this not possible? If I turn the

How to show/hide password in Ext.form.TextField

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-23 15:24:02
问题 could you please show me the solution to make the input text of password field show/hide when clicking another button?! I've tried to change the inputType property of that textfield, but it was rendered at that time so it didn't affect. Another way is create 2 textfields and visbile/invisible them, but I don't like do this, because it looks like cheating... Thank in advance. 回答1: Well this post is a little old, but I thought I'd answer it anyway. Maybe it will help someone else. You are

Resolving Dirty Flag in Ext.grid.Panel cell

丶灬走出姿态 提交于 2019-12-23 15:07:17
问题 In an Ext JS grid, I'm editing individual cells. In one of the columns I have a Save button which fires the Save event. How can I remove the dirty flag (in red box in my image below) in the edited cell? I don't know how to perform the create, update and destroy options with the proxy because the documentation have a good example, so I'm planning on doing an AJAX request for these steps until I can take actual Sencha training. However, if the dirty flag resolves itself if I work the store and

extjs Panel fit layout

廉价感情. 提交于 2019-12-23 13:09:12
问题 I have a panel and i am rendering it into a container. I want the panel to fit into the container height and don't want to specify the height of the panel . But don't seem to work is there a way I could do it. CODE SNIPPET <div id=Div style="width: 100%; height: 100%;"></div> var newPanel = new Ext.Panel({ id: 'newPanel', renderTo: 'Div', layout: 'fit', border: false, items: [anotherPanel] }) any ideas please help 回答1: You could use this plugin: http://www.sencha.com/forum/showthread.php

Sencha Touch: Disable scrolling for a Panel, List, or DataView?

吃可爱长大的小学妹 提交于 2019-12-23 13:08:32
问题 I see that panels have the option to set scroll: to horizontal or vertical, but is there any way to do something like: scroll: 'false' ? I've tried such without luck. I have a DataView nested in a Panel. I can set the scroll direction of each independently, but I want the DataView not to scroll at all. [Any tips will earn answer points and a digital high five. Heck, I'll even throw in a bonus high SIX!] 回答1: Okay, turns out by fudging around a bit (as I've learned to do with poorly documented