extjs

Extjs paging toolbar with grid panel not working

只愿长相守 提交于 2019-12-11 14:04:58
问题 I have the below code for paging in extjs... Even though I set it as 5 records per page, it still shows 6... and page 1 of 2 does not show "1"... I had problem with data from sql Click here to go that Thread.... so I decided to try out with memory store... but I still don't get the paging right.... any help? constructor: function () { this.callParent(arguments); var store = Ext.create('Ext.data.Store', { pageSize: 5, storeId: 'simpsonsStore', fields: ['name', 'email', 'phone'], data: {

Grails extJS grid paging

℡╲_俬逩灬. 提交于 2019-12-11 13:57:17
问题 Hy, I have a problem with extjs and grails. When I a try call the next page of the grid, I don't have the objects. The grid still with the old objects. How can I do to paginate my grid? 回答1: add below to your store cfg: paramNames: {start:'offset',limit:'max',sort:'sort',dir:'order'}, baseParams: {offset:0,max:this.pageSize}, then the controller: def result = Floor.createCriteria().list( max:params.int('max')?:100, offset:params.int('offset')?:0 ) render ([count:result.totalCount,data:result]

How to select a specific record from the store in a ComboBox (ExtJS)

心不动则不痛 提交于 2019-12-11 13:43:12
问题 I have a ComboBox with a remote json store. It lets the user type in 3+ characters, then queries, displays list and lets user select one option. When the user selects an option, it uses the Ext.data.Record associated to the selected option to populate other fields elsewhere in the form. This works correctly. Now I want to be able to pre-populate the said fields, by using the functions that I've already written as part of the combo box. What I have come up with, is to add an "artificial record

Invalid format with Json when converting DataTable with Json.Net

末鹿安然 提交于 2019-12-11 13:19:55
问题 I'm trying to convert DataTable to JSON using Newtonsoft.JSON but found that the output is not what ExtJS grid and chart would expect. My code is string output = JsonConvert.SerializeObject(dt, Formatting.Indented, new JsonSerializerSettings { ReferenceLoopHandling = ReferenceLoopHandling.Ignore }); and this returns Json string as "[{\"DAYDATE\":\"2012-05-22T00:15:00\",\"SERIES1\":3.65}]" If I remove '\' and start and end double quotes it works fine with ExtJS. I also tried changing date

ExtJS checkcolumn grid - check columns to left, uncheck columns to right

我只是一个虾纸丫 提交于 2019-12-11 13:19:15
问题 I am working on an ExtJS grid comprised of a text column detailing the items in the grid, and several checkColumns that represent whether an item has been through a particular point in a process: Ext.Loader.setConfig({ enabled: true }); Ext.Loader.setPath('Ext.ux', '../ux'); Ext.require([ 'Ext.ux.CheckColumn' ]); Ext.onReady(function(){ Ext.define('ProcessModel', { extend: 'Ext.data.Model', fields: [ 'Item', 'Phase1', 'Phase2', 'Phase3', 'Phase4', 'Phase5', 'Phase6', 'Phase7', 'Phase8',

How to add tooltip to text form field in extjs6

别等时光非礼了梦想. 提交于 2019-12-11 13:17:59
问题 I have function for creating/rendering input fields but i don't know how to add tool tip on it in EXTjs6 this is my function: createInputField: function(value, fieldsMarginBottom, readonly) { var fieldStyle = this.getFieldStyle(readonly); var nameField = Ext.create('Ext.form.field.Text', { name: 'name', readOnly: true, hideLabel: true, value: value, width: this.fieldWidth, style: { marginBottom: fieldsMarginBottom + 'px' }, //My try which is not working tooltip: { trackMouse: true, width: 140

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

Select a value from a variable

和自甴很熟 提交于 2019-12-11 13:04:51
问题 In Extjs, I am trying to select a value accrued from a variable Store . I tried: var newStore = Store.data.items[0].data.accrued; The above one is not working. I am getting error: Uncaught TypeError: Cannot read property 'data' of undefined Whenever I add items[0] , it is making the variable undefined. When I checked: var newStore = Store.data.items.length; output is: 0 //? But I can see that there are items in Store variable here as shown in the above image. Anyway, I just want to get the

ExtJS + JQuery/Flot: mousedown event for the plot container

别说谁变了你拦得住时间么 提交于 2019-12-11 12:58:47
问题 I realized that in flot there is a confliction between "plotpan" event and "mousedown" event. if enable the plot pannable, then mousedown wont work in the plot area; also, if disable "plotpan" event, but enable "plotclick" event and "mousedown" event, it turns out that only mousedown works but plotclick doesnt. how can I make sure that these three or more events can work in a more apporpriate way? demo codes are attached as follows: <html> <head> <title>A Test Page</title> <!-- JQUERY/FLOT

ExtJs 4.2: 'id' of Controller

一笑奈何 提交于 2019-12-11 12:58:21
问题 I have set the 'id' config of controller like Ext.define('App.controller.popUpController', { extend: 'Ext.app.Controller', /** * @cfg {String} view * View for which popUpController will act as a controller */ view: [ 'PopUpWindow' ], id:'testController' }) But when I am trying to retrieve id of controller to pass it to Ext.app.EventBus.unlisten(App.app.getController('popUpController').id) It is returning name of controller: 'popUpController' not the id: 'testController' . Although I am