Soel Posted May 5, 2020 Share Posted May 5, 2020 Olá a todos, Recentemente estou migrando meus projetos de VCL para Unigui. Deparei-me com uma barreira a qual não estou conseguindo passar. Utilizo de um MemoryDataSet ao qual os dados são preenchidos dinamicamente e paginados conforme a necessidade do usuário e vinculado ao UniDBGRID. No entanto não estou conseguindo fazer com que o UniDBgrid me permita a paginação manual dos eventos. A unica coisa que consegui fazer ate o momento foi capturar os eventos de next, Prev, First, Last e encaminhar ao Delphi para tratamento. Até esse ponto tudo bem, no entanto quando efetuo a paginação dos dados o Grid "Reseta" o PageNumber para 1, não permitindo assim o retorno de paginação dos dados anteriores. Ou seja, se eu cliquei em página 2, ele carrega os dados desta pagina corretamente, mas o numero da pagina no rodapé do grid volta para 1 e desabilita os botões de First e Prev. Mesmo se eu forçar a alteração manual via JS. Segue meus Eventos: Em UniDBGRID -> lCliente Events -> Ext.Grid.Panel -> afterrender function afterrender(sender, eOpts) { var me = sender; if (me.pagingBar) { var currentPage = me.pagingBar.getComponent("inputItem").getValue(); me.pagingBar.getComponent("next").handler = function() { me.pagingBar.getComponent("inputItem").setValue(currentPage+1); ajaxRequest(me, '_next', []); }; me.pagingBar.getComponent("prev").handler = function() { me.pagingBar.getComponent("inputItem").setValue(currentPage-1); ajaxRequest(me, '_previous', []); }; me.pagingBar.getComponent("first").handler = function() { me.pagingBar.getComponent("inputItem").setValue(1); ajaxRequest(me, '_first', []); }; } } No Delphi no evento OnAjaxEvent do DbGrid : procedure TFormUniTeste.dbgAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin if EventName = '_next' then ListEvents(Pagina+1); if EventName = '_previous' then ListEvents(Pagina-1); if EventName = '_first' then ListEvents(1); end; Se alguém já passou por isso ou puder dar uma ajuda ou alguma dica de como contornar essa situação, ficaria grato. Desde já agradeço a atenção. Link to comment Share on other sites More sharing options...
Sherzod Posted May 5, 2020 Share Posted May 5, 2020 3 hours ago, Soel said: Recentemente estou migrando meus projetos de VCL para Unigui. Hello, Sorry, can you please specify, which edition and build of UniGUI are you using? Link to comment Share on other sites More sharing options...
Soel Posted May 5, 2020 Author Share Posted May 5, 2020 Sherzod. I'm using uniGUI Professional 1.90.0.1514. Link to comment Share on other sites More sharing options...
Sherzod Posted May 5, 2020 Share Posted May 5, 2020 Not a trial edition? Link to comment Share on other sites More sharing options...
Soel Posted May 5, 2020 Author Share Posted May 5, 2020 Not a trial. Why? Link to comment Share on other sites More sharing options...
Sherzod Posted May 5, 2020 Share Posted May 5, 2020 7 minutes ago, Soel said: Not a trial. Why? First of all, please adjust your forum email address, this allows you to use additional forum features: Secondly, can you upgrade to the latest builds and check..? In any case, after adjusting your email, you can attach a test case to see the problem. Link to comment Share on other sites More sharing options...
Soel Posted May 5, 2020 Author Share Posted May 5, 2020 Ok, thanks. Link to comment Share on other sites More sharing options...
Sherzod Posted May 5, 2020 Share Posted May 5, 2020 Thank you, please adjust your forum email address. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now