extjs6

Extjs6 Excel like grid filters with store

99封情书 提交于 2020-01-07 04:18:10
问题 I am trying to create a complex filter for a grid. I want the following general behavior: The filters have a different store than the grid Apply filter on column A The grid is filtered based on my selection The filter in column B will show the available items Also, the grid has a button that clears all the filters and more, remove the checked items from the filters. Based on this link I've tried to do something similar. I've created also a fiddle. Regarding the fiddle, I have some question: 1

ExtJS 6 - Bind disabled property to new records in a store

这一生的挚爱 提交于 2020-01-05 09:14:20
问题 I'm trying to enable/disable a button when the store getNewRecords() function return the length, but not work! bind: { disabled: "{!grid.getStore().getNewRecords().length}" } Fiddle: https://fiddle.sencha.com/fiddle/1sj5 Someone have idea to how resolve this? 回答1: You need to create a formula in your viewmodel: viewModel: { formulas: { hasNewRecords: function (r) { return this.getView().down("treepanel").getStore().getNewRecords().length > 0; } } } then you can use it for your bindings: bind:

In ExtJs 6.2, a column that contains an item does not take into account its flex property, is there a workaround?

让人想犯罪 __ 提交于 2020-01-03 03:24:32
问题 In ExtJs 6.2, there is a bug described here in the Sencha Forum. Since 6.2+ Ext.grid.Panel ignores flex when using column items. Steps to reproduce the problem: Create a grid in fiddle with 6.2+ Add columns without items and flex:1 klick run in fiddle and it looks just fine Add a item to the column with flex:1 klick again run in fiddle an flex wil get ignored! The result that was expected: I would expect the column to flex. The result that occurs instead: The column will render in the minimum

Trying to bind a store to a ViewModel

丶灬走出姿态 提交于 2019-12-25 17:01:58
问题 I'm used to ExtJs with MVC pattern, and I'm trying to implement MVVM pattern. I'm not able to bind a store to my view. I have a main grid, and try to open a details grid when selecting a line. detailsView = mainPanel.add({ xtype: 'rma-details', viewModel: {data: {id: id}} }) Ext.define('Mb.view.rma.Details', { extend: 'Ext.grid.Panel', alias: 'widget.rma-details', requires: [ 'Mb.view.rma.DetailsController', 'Mb.view.rma.DetailsModel' ], controller: 'rma-details', viewModel: {type: 'rma

ExtJS6: How to set leftpad margin to 0 for treelist items

心不动则不痛 提交于 2019-12-25 07:15:17
问题 I have a treelist working using ExtJS6 but since items are left padded automatically given their depth and text inside it gets truncated for third child and deeper. Since I use it as a menu, having fixed width. I need to remove auto calculated leftpad margin. I did not find anything useful while going through extjs api for treelist. Could anyone please help 回答1: If you look at the code of treelist and treelistitem and abstract tree list item for a minute, you see that you can use the

How fix cross origin error in extjs6?

…衆ロ難τιáo~ 提交于 2019-12-25 06:58:51
问题 I'm developing an application using Extjs-6.0.0 in client side. I run client side application in port 80 . My server side application running in port 8084 . When I submit a form with form.submit , the follow errors are occur. XMLHttpRequest cannot load localhost:8084/GeoAd/ad/add. Cross origin requests > are only supported for protocol schemes: http, data, chrome, chrome-extension, > https, chrome-extension-resource. chrome-extension, https, chrome-extension-resource. Uncaught NetworkError:

Extjs 6.5.3 Binding hidden property of widgetcolumn from record values

烈酒焚心 提交于 2019-12-25 03:14:12
问题 I want to show/hide widgetcolumn of a grid with a property of my record. I tried to do that with binding my value : { xtype: 'grid', bind: { store: 'ActionList' }, border: true, flex: 2, name: 'actionList', title: this.titleActionGrid, columns: [{ xtype: 'widgetcolumn', height: 50, width: 65, widget: { xtype: 'button', text: '{sActionTitle}', scale: 'large', height: 45, width: 45, margin: 5 }, bind: { hidden: '{bIsHidden}' } }] } that didn't work so i search on internet and i find this fiddle

Paging not working properly in extjs

∥☆過路亽.° 提交于 2019-12-25 02:49:10
问题 My paging bar displays and says Displaying 1 - 5 of 10. But all of the 10 records are being displayed. I can't seem to figure it out. Here is my List.js file Ext.define('MyApp.view.main.List', { extend: 'Ext.grid.Panel', xtype: 'mainlist', require: [ 'MyApp.view.student.StudentForm' ], title: 'Student Records', scrollable: true, margin: 20, layout: { type: 'vbox', align: 'stretch' }, reference: 'studentGrid', frame: true, collapsible: true, store: 'StudentStore', collapsible: true, columns: [

ComboBox showing HTML as text

独自空忆成欢 提交于 2019-12-25 01:30:49
问题 My treecolumn has a ComboBox as the editor component. The choices in the options menu are rendered correctly with HTML, but the input box does not render HTML, it only shows the tags (See images below.) How I can make it to also render the value as HTML? P.S. This solution here EXTJS 4 render HTML of a selected value in a combobox is seems like not working with extjs6 version, check here Here's the problem place code (rendere in case depth.TypeParameter: returns text with html tags) { xtype:

How to get rowIndex in extjs widget column

独自空忆成欢 提交于 2019-12-24 11:27:43
问题 I need a button in a widget column to know its rowIndex in an ExtJS 6 panel.grid, so that on button click it can use that functionality. I know I can pull that information from the renderer function, but that seems to execute before the button has been created. Any ideas on how I can get the index? 回答1: Use indexOf on the gridview . You need to pass it the node as argument, which is the HTML element representing the row. In Ext JS 6, grid rows are HTML tables, so the button's row element can