PxPlus User Forum

Twitter Twitter Twitter

Author Topic: Event within grid not triggering  (Read 602 times)

Zereliq

  • Member
  • **
  • Posts: 14
    • View Profile
Event within grid not triggering
« on: October 17, 2022, 09:19:34 AM »
I have a grid with multiple listboxes, the listboxes all look as followed:

[list project_code$ (_lock$) event=uren.pxp@update_col][data rowsep=/ valsep=: text=(project_tbl$)][/list]

they all have the same event so uren/pxp@update_col
but whenever i triggered one of the events, the other listboxes will not trigger the events anymore onchange.
(page starts loading on first change in listbox, doesnt load on change second time onchange listbox this include changing the same listbox twice doesnt work the second time)

Is there a different way of triggering these events onchange for a listbox?
« Last Edit: October 18, 2022, 02:31:45 AM by Zereliq »

Mike King

  • Administrator
  • Diamond Member
  • *****
  • Posts: 3698
  • Mike King
    • View Profile
    • PVX Plus Technologies
Re: Event within grid not triggering
« Reply #1 on: October 20, 2022, 10:21:13 AM »
We were able to replicate this issue and have corrected the JavaScript libraries so if you have downloaded them you will need to re-download again otherwise simply refresh your forms (ctrl-F5 on most browsers) and the event should work.

In order to test this we did make a sample Webster application and I have attached a ZIP file to this message
« Last Edit: October 20, 2022, 10:23:11 AM by Mike King »

Zereliq

  • Member
  • **
  • Posts: 14
    • View Profile
Re: Event within grid not triggering
« Reply #2 on: October 25, 2022, 08:30:16 AM »
Hey Mike,

First of all thanks for taking the time to look into this bug/issue, but sadly after updating my local libraries and using ctrl+f5 on the page with the issue i still get the same problem.  After triggering an event with a listbox it doesnt trigger any other listbox events after. (only after a refresh or trigger from another element will it work again)

Would love to hear your suggestions  ;D

Mike King

  • Administrator
  • Diamond Member
  • *****
  • Posts: 3698
  • Mike King
    • View Profile
    • PVX Plus Technologies
Re: Event within grid not triggering
« Reply #3 on: October 25, 2022, 10:04:33 AM »
Did you try the setup I included in the zip file?

Also what release are you using? We addressed the issue for version 19 -- are you using v18?

Zereliq

  • Member
  • **
  • Posts: 14
    • View Profile
Re: Event within grid not triggering
« Reply #4 on: October 25, 2022, 11:21:31 AM »
Hey Mike,

Thanks for the suggestion I resolved some issues with our licensekey and checked for updates (updates which returned we're running on the latest version) inside pxplus.exe, however after having done that it seems that i can not update the library nor get the library on a fresh installation. It seems to stop after having some files added in the docroot > lib folder (see attachment two) and after a long while gives me a error #3 (see attachment one)
« Last Edit: October 25, 2022, 11:23:05 AM by Zereliq »

Mike King

  • Administrator
  • Diamond Member
  • *****
  • Posts: 3698
  • Mike King
    • View Profile
    • PVX Plus Technologies
Re: Event within grid not triggering
« Reply #5 on: October 25, 2022, 11:30:35 AM »
That looks like perhaps the sysimage zip file did not come down cleanly.  Try deleting (or renaming to allow for restore if needed) the docroot/lib directory and try to download again.

Mike King

  • Administrator
  • Diamond Member
  • *****
  • Posts: 3698
  • Mike King
    • View Profile
    • PVX Plus Technologies
Re: Event within grid not triggering
« Reply #6 on: October 31, 2022, 03:50:31 PM »
Were you able to get your list boxes inside a grid to fire events?

Zereliq

  • Member
  • **
  • Posts: 14
    • View Profile
Re: Event within grid not triggering
« Reply #7 on: November 08, 2022, 05:46:58 AM »
Hi Mike,

Sorry for the long awaited respons, I have gotten the listboxes to trigger events so that works fine now
although I have gotten repeated errors on trying to download the library locally so i decided to keep that globally.

May I make one more suggestion when it comes to grids in Webster+:
Whenever you edit/ update or remove a row it will reset the tabindex, therefor making it sometimes a bit annoying to work in a grid structure.
Now I have checked to fix this with some .JS but sadly without succes, maybe this would be a nice touch in the default webster.js

Thanks again  ;) ;D

Mike King

  • Administrator
  • Diamond Member
  • *****
  • Posts: 3698
  • Mike King
    • View Profile
    • PVX Plus Technologies
Re: Event within grid not triggering
« Reply #8 on: November 08, 2022, 10:31:54 AM »
We will have a look at the issue with the tabindex and also checkout the download library. 
Just to confirm, what version PxPlus are you running?

Zereliq

  • Member
  • **
  • Posts: 14
    • View Profile
Re: Event within grid not triggering
« Reply #9 on: November 09, 2022, 06:17:03 AM »
running PxPlus 2022 (Version 19.10), as far as i know latest version (we updated when you released the webster updates)

Mike King

  • Administrator
  • Diamond Member
  • *****
  • Posts: 3698
  • Mike King
    • View Profile
    • PVX Plus Technologies
Re: Event within grid not triggering
« Reply #10 on: November 21, 2022, 05:11:48 PM »
Can you advise what the issue is with tabindex?  We have tried a number of variations and it seemed to work for us.

Zereliq

  • Member
  • **
  • Posts: 14
    • View Profile
Re: Event within grid not triggering
« Reply #11 on: November 23, 2022, 03:59:38 AM »
Hey Mike,

Inside a grid; When adding or changing a value for example
Code: [Select]
WRITE ([grid],rec=[obj])
or
%WEBSTER'UPDATE(FIELD$,VALUE$,GRID$,ROW)
will both reset the tabindex back to the first column in the first row instead of staying where its suppost to be.

See the GIF attachment i have recorded what happends in the current situation.


Mike King

  • Administrator
  • Diamond Member
  • *****
  • Posts: 3698
  • Mike King
    • View Profile
    • PVX Plus Technologies
Re: Event within grid not triggering
« Reply #12 on: November 25, 2022, 08:08:26 AM »
Okay, it appears the issue you are changing the cell contents for the cell that currently has focus?


Mike King

  • Administrator
  • Diamond Member
  • *****
  • Posts: 3698
  • Mike King
    • View Profile
    • PVX Plus Technologies
Re: Event within grid not triggering
« Reply #13 on: November 25, 2022, 09:51:19 AM »
As a follow up, If you are updating the cell that currently has focus such that the cell (or row) has to be reloaded you generally will have to use the 'Focus(variable_name$) method to set the focus to the cell/control.

There is no easy way for the system to guess at where you want focus to go when making changes to control that currently has focus so when doing this is is a good idea to force focus.

When forcing focus to a grid cell the name of the variable will be GGGGG-RRR-VVVVV where GGGGG Is the name of the grid, RRR is the row number, and VVVVV is the variable name (e.g. "mygrid-3-accttype$")