delagoutte Posted August 7, 2018 Posted August 7, 2018 for extjs 6 change ptStore.pageSize = value[0].data.field1; by ptStore.pageSize = value.data.field1; Quote
delagoutte Posted August 7, 2018 Posted August 7, 2018 An other problem : if you use the combo box for changing pagesize it seems that it is changed only on client side. If you change datasource on server(on applying filter for exemple), it used the value that is in weboptions.pagesize and not the value that is in combo. How can we change value on serverside when we change on client side ? Quote
thiagopedro Posted October 3, 2018 Posted October 3, 2018 Does anyone have a working example in ext-6.5.3? Quote
Tokay Posted January 3, 2019 Posted January 3, 2019 I also need a help with this topic. I need a working example of PageSize Extension for UniDBGrid for latest UniGUI, thank you! Quote
Marlon Nardi Posted January 28, 2019 Posted January 28, 2019 On 1/3/2019 at 9:37 AM, Tokay said: I also need a help with this topic. I need a working example of PageSize Extension for UniDBGrid for latest UniGUI, thank you! On 10/3/2018 at 3:02 PM, thiagopedro said: Does anyone have a working example in ext-6.5.3? On 8/7/2018 at 2:30 PM, delagoutte said: An other problem : if you use the combo box for changing pagesize it seems that it is changed only on client side. If you change datasource on server(on applying filter for exemple), it used the value that is in weboptions.pagesize and not the value that is in combo. How can we change value on serverside when we change on client side ? Example the latest version uniGui. Serverside its worked. https://github.com/marlonnardi/extjs-ux-paging-toolbar-resizer/blob/master/ux/PagingToolbarResizer.js function beforerender(sender, eOpts) { if (sender.pagingBar) { sender.removeDocked(sender.pagingBar, true); sender.addDocked({ dock: 'bottom', items: [Ext.create('Ext.PagingToolbar', { pageSize: sender.store.pageSize, store: sender.store, displayInfo: true, displayMsg: 'Visualizando {0} - {1} de <b>{2}</b>', emptyMsg: "Não há registros", plugins: Ext.create('Ext.ux.PagingToolbarResizer', { displayText: 'Registros por página', options: [25, 50, 100, 150, 200] }) })] }); } } Visit my Store https://store.falconsistemas.com.br PageSizeExtension.rar 3 Quote
Tokay Posted January 29, 2019 Posted January 29, 2019 1. Do we need the PagingToolbarResizer.js? If I understand correctly, your sample works fine without this file. 2. For all: code posted by Marlon Nardi shall be added to the beforerender event of the grid: function beforerender(sender, eOpts) { if (sender.pagingBar) { sender.removeDocked(sender.pagingBar, true); sender.addDocked({ dock: 'bottom', items: [Ext.create('Ext.PagingToolbar', { pageSize: sender.store.pageSize, store: sender.store, displayInfo: true, displayMsg: 'Visualizando {0} - {1} de <b>{2}</b>', emptyMsg: "Não há registros", plugins: Ext.create('Ext.ux.PagingToolbarResizer', { displayText: 'Registros por página', options: [25, 50, 100, 150, 200] }) })] }); } } Quote
Marlon Nardi Posted January 29, 2019 Posted January 29, 2019 Quote 1. Do we need the PagingToolbarResizer.js? If I understand correctly, your sample works fine without this file. Source code in the ServerModule. Quote 2. For all: code posted by Marlon Nardi shall be added to the beforerender event of the grid: Quote
Sherzod Posted January 29, 2019 Author Posted January 29, 2019 19 hours ago, Marlon Nardi said: Example the latest version uniGui. Thanks Marlon Quote
Tokay Posted February 4, 2019 Posted February 4, 2019 On 1/29/2019 at 2:27 PM, Marlon Nardi said: Source code in the ServerModule. Ok. Thank you Quote
multimesut Posted February 28, 2019 Posted February 28, 2019 On 6/20/2017 at 8:27 AM, Sherzod said: Hi, Can you check with this solution for now ?!: http://forums.unigui.com/index.php?/topic/7983-new-pagesize-is-not-taken-into-account-when-it-is-changed-at-runtime/&do=findComment&comment=40915 Best regards, Hi @Sherzod , the following code does not work in extjs6. what can I do? Thank you Procedure TMSTUniDBGrid.Loaded; begin inherited; JSAddListener('store.beforeload', JSFunction('store, operation, eOpts', 'if (operation.params) {operation.params.limit = operation.limit;}') ); end; Quote
Sherzod Posted February 28, 2019 Author Posted February 28, 2019 5 minutes ago, multimesut said: , the following code does not work in extjs6. what can I do? Thank you Hi, On 1/28/2019 at 9:23 PM, Marlon Nardi said: PageSizeExtension.rar Can you try to use this instead? Quote
multimesut Posted February 28, 2019 Posted February 28, 2019 47 minutes ago, Sherzod said: Hi, Can you try to use this instead? Yes, same problem. PageSize is failing for Reflesh. does not work in solution. (operation.params.limit) procedure TMainForm.UniButton1Click(Sender: TObject); begin CDS.Active:=false; end; procedure TMainForm.UniButton2Click(Sender: TObject); begin CDS.Active:=true; end; Quote
Sherzod Posted February 28, 2019 Author Posted February 28, 2019 3 hours ago, multimesut said: Yes, same problem. PageSize is failing for Reflesh. does not work in solution. (operation.params.limit) OK, I will check Quote
multimesut Posted March 1, 2019 Posted March 1, 2019 21 hours ago, Sherzod said: OK, I will check thanks Quote
Sherzod Posted March 4, 2019 Author Posted March 4, 2019 2 hours ago, multimesut said: hello @Sherzod, did you test? Hello, As a workaround, can you try this approach?: procedure TMainForm.UniButton2Click(Sender: TObject); begin CDS.Active := True; dbg1.JSInterface.JSCode('Ext.defer(function(){'#1'.getStore().load()}, 20);'); //<--- end; Quote
multimesut Posted March 4, 2019 Posted March 4, 2019 yes, it works. thanks. but it will be a manual method. not detecting limit value. Can't do it automatically in the old version. I was using the code below. JSAddListener('store.beforeload', JSFunction('store, operation, eOpts', 'if (operation.params) {operation.params.limit = operation.limit;}') ); 1 Quote
eduardosuruagy Posted June 5, 2019 Posted June 5, 2019 On 1/28/2019 at 2:23 PM, Marlon Nardi said: Example the latest version uniGui. Serverside its worked. https://github.com/marlonnardi/extjs-ux-paging-toolbar-resizer/blob/master/ux/PagingToolbarResizer.js function beforerender(sender, eOpts) { if (sender.pagingBar) { sender.removeDocked(sender.pagingBar, true); sender.addDocked({ dock: 'bottom', items: [Ext.create('Ext.PagingToolbar', { pageSize: sender.store.pageSize, store: sender.store, displayInfo: true, displayMsg: 'Visualizando {0} - {1} de <b>{2}</b>', emptyMsg: "Não há registros", plugins: Ext.create('Ext.ux.PagingToolbarResizer', { displayText: 'Registros por página', options: [25, 50, 100, 150, 200] }) })] }); } } Visit my Store https://store.falconsistemas.com.br PageSizeExtension.rar I used this option from Marlon but it's giving this problem. Quote
Sherzod Posted June 6, 2019 Author Posted June 6, 2019 13 hours ago, eduardosuruagy said: I used this option from Marlon but it's giving this problem. Hello, Which build are you using? Have you tried with the latest build? Quote
eduardosuruagy Posted June 6, 2019 Posted June 6, 2019 2 hours ago, Sherzod said: Olá, Qual build você está usando? Você já tentou com a mais recente versão? I'm using the most recent and the theme is Gray Quote
Sherzod Posted June 6, 2019 Author Posted June 6, 2019 21 minutes ago, eduardosuruagy said: I'm using the most recent and the theme is Gray Sorry, can you make a simple testcase for reproduce? Quote
eduardosuruagy Posted June 6, 2019 Posted June 6, 2019 1 hour ago, Sherzod said: Desculpe, você pode fazer um simples testcase para reproduzir? Follow the test!! UniGui - DBGrid Filtros.rar Quote
eduardosuruagy Posted June 6, 2019 Posted June 6, 2019 Note that the query fields are small, do not fill the entire space Quote
Sherzod Posted June 7, 2019 Author Posted June 7, 2019 15 hours ago, eduardosuruagy said: Follow the test!! Hi, Thanks for the test case. Try to use this approach. 1. Remove: function beforerender 2. Add: dbgrid_cadastro2 -> ClientEvents -> UniEvents -> function pagingBar.beforeInit(sender, config): function pagingBar.beforeInit(sender, config) { config.displayInfo = true, config.displayMsg = 'Visualizando {0} - {1} de <b>{2}</b>', config.emptyMsg = "Não há registros", config.plugins = Ext.create('Ext.ux.PagingToolbarResizer', { displayText: 'Registros por página', options: [25, 50, 100, 150, 200] }); } Quote
eduardosuruagy Posted June 7, 2019 Posted June 7, 2019 8 hours ago, Sherzod said: Hi, Thanks for the test case. Try to use this approach. 1. Remove: function beforerender 2. Add: dbgrid_cadastro2 -> ClientEvents -> UniEvents -> function pagingBar.beforeInit(sender, config): function pagingBar.beforeInit(sender, config) { config.displayInfo = true, config.displayMsg = 'Visualizando {0} - {1} de <b>{2}</b>', config.emptyMsg = "Não há registros", config.plugins = Ext.create('Ext.ux.PagingToolbarResizer', { displayText: 'Registros por página', options: [25, 50, 100, 150, 200] }); } It works perfectly thank you very much for the answer, now why the filter does not follow the size of the column anymore? In the previous version I did not have this problem. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.