Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
5
Erster Beitrag:
vor 1 Jahr, 4 Monaten
Letzter Beitrag:
vor 1 Jahr, 4 Monaten
Beteiligte Autoren:
NickMarlu, Danny Lauwers, Fabrice Harari

[WB21]Wrongs with table data

Startbeitrag von NickMarlu am 27.07.2016 22:01

Hi everyone. I am Nick a pleasure to meeting you

I need help please.

I have a page with a popup page, this popup have a table in ajax mode filled by programming but, when I need get the value from a selected row. the debugger show me that i dont have information in the table...but actually in the browser i can watch it.

in fact, when I insert a debug sentence (for example Table_Table..Occurrence) the Occurrence value return 0.

You know why this happens?

Thanks in advance.

Antworten:

Hi Nick,

In webdev, browser side and server side are VERY diferent. So for each part of your description, you need to tell us WHERE things are done...

By example: "...a table in ajax mode filled by programming IN SERVER CODE INIT OF THE PAGE..."
By example: "...for example Table_Table..Occurrence IN BROWSER CODE CLICK ON BUTTON XX"

If we don't know that, it will be very hard to have an idea of what's happening
As a general rule, the browser side does not know what the server side is doing and the server side doesn't know what the browser side is doing, EXCEPT FOR THE EXPLICIT COMMUNICATION between the 2 (submit button, displaypage, etc)

Best regards

von Fabrice Harari - am 27.07.2016 22:18
Hi Fabrice... thanks for your help

Im filling the table in a server code in a button (clic event, server) inside of the popup page, I use the popupdisplay sentence and then I use executeprocess(popuppage.BTN_Button,trtclic)

the synthax:

//ServerCode Clic event

IF NOT gbValidate THEN
Save()
ELSE
ExecuteProcess(LAYOUT_Area_CONTENT.CELL_Data.BTN_FillTable,trtClick)
ExecuteProcess(POPUP_Duplicates.BTN_Refresh,trtClick) //this event fill the table
END




The method (server) do:

QRY_Phones.ParamNumber = LAYOUT_Area_CONTENT.CELL_Data.EDT_RefPhone
HExecuteQuery(QRY_Phones)
QRY_PersonasMail.ParamEMailAddress = LAYOUT_Area_CONTENT.CELL_Data.EDT_RefMail
HExecuteQuery(QRY_Mails)


FOR EACH QRY_Phones
TableAddLine(TABLE_QRY_Duplicates,QRY_Phones.PersonId,QRY_Phones.name)
END

FOR EACH QRY_Mail
TableAddLine(TABLE_QRY_Duplicates,QRY_Mail.PersonId,QRY_Mail.name)
END

thanks again.

von NickMarlu - am 27.07.2016 22:27
Hi Nick,

What do you get in the AJAX server event "Row Selection" of your table when you click a row. You should be entering this event. If you place this in your code:


Trace(CurrentSubscript())



you should get the index of the selected row in the trace window.

If this is correct, then you can continue to use:


nIndex is int = CurrentSubscript()
TABLE_MYTable[nIndex].MyColomn



To get data from the column

Hope you get it working, I use AJAX tables in popup's all the time, and there working great !

Danny

von Danny Lauwers - am 28.07.2016 06:23
Thanks Danny and Fabrice.

Finally I solved...

I forgot to save the variable in the AWPcontext...

now, runs great.

best regards

von NickMarlu - am 28.07.2016 17:31
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.