PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → [WB21] - Table Control Click to Load Page
[WB21] - Table Control Click to Load Page
Iniciado por guest, 14,jun. 2016 09:00 - 2 respuestas
Publicado el 14,junio 2016 - 09:00
Hi All

Classic Site

I have an Ajax type Table control on a page with some rows the user can select. But there seems no way to load a page when a row is selected.

1) Table is Ajax

a) Trying to use PageDisplay() in Table control server click code cause error "PageDisplay not allowed in WebDev Ajax"

b) Trying to use PageDisplay() in Table control browser click code causes error "Page must be static, not dynamic"


2) Table is Browser

Similar issues that you can't get a dynamic page to load from a browser based control.

The workaround is I put a button on the page as well. The user then selects a row and then he must click the button. The button retrieves the row selected and loads a dynamic page on the server. But what a kludge! Why can't I just load a page when the user clicks a row kn the table? Is it possible and I miss something or is this the way it is ?

TIA
Publicado el 14,junio 2016 - 15:13
Hi JP,

this is one of the trade off for the ajax mode...

So you have HALF the solution...

You already have your button, and now, in the browser area of the line selection, do a executeprocess of the button clic. THat will execute first the browser code of the button, then its SERVER code. and as this server code is NOT in ajax, you can do a pagedisplay.

Of course, the button can be hidden

Best regards
Publicado el 14,junio 2016 - 16:01
Fabrice,

LOL! That is 100% exactly what I found I could do! In the Table control - Click-Browser I run ExecuteProcess( trtClick ) on a button which sits off-screen/invisible. The button server code is Ajax--Off and it can use PageDisplay() to display a page. Seems a kludge but it works :)