PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WEBDEV 2024 → New to winDev, WebDev,WinDev Mobile
New to winDev, WebDev,WinDev Mobile
Iniciado por Carlos Antunez, 10,ago. 2014 07:34 - 5 respuestas
Publicado el 10,agosto 2014 - 07:34
Hi

I am completely new to Windev and I have a couple of questions and hope you can help me out.

I come fro the Delphi world and in Delphi is a little different when handling databases and records, data grids are automatically bounded to a table and when scrolling on a grid all fields linked to the same data source of the grid it will automatically update when the the grid gets scrolled.

My first question is
I have a table linked to a data file (employees) and 4 edit fields attached to 4 fields from the employee data file.

What will be the code and where to put in my table so that when the user scrolls up or down or the user click on a row on the table, it will automatically update the fields linked to the employee data file displaying the values from the data file.

How do I cancel an editing, to a record been updated, in one of the above mentioned fields, and leaving the table row unmoved.

Thank you so much for your help.

Regards,

Carlos
Publicado el 11,agosto 2014 - 13:04
Hi Carlos

Welcome!

What will be the code and where to put in my table so that when the user
scrolls up or down or the user click on a row on the table, it will
automatically update the fields linked to the employee data file
displaying the values from the data file.


As your table is linked to the data file, the file record buffer is
constantly filled with the record matching the selected line.

So to fill your separate fields, you need to :
- make sure they are "linked" to the file. If you dragged them from the
file definition, they are. If not go in their properties and link them
in the content tab
- in the table control code, in the "Selection of a line" area, type
FileToScreen(YourFileName, YourWindowName)

That's all


How do I cancel an editing, to a record been updated, in one of the
above mentioned fields, and leaving the table row unmoved.


Nothing to do... As long as you do not EXPLICITLY request an update of
the file, it is not changed. So just do a screentofile+hmodify when you
want to update the file, and that's it

Considering your questions, I strongly suggest that you spend a few days
following in DETAILS the tutorial that comes with the tool... The
answers to your questions (and many you haven't asked yet) are there.


Best regards


--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

NEW: WXShowroom.com is available: Show your projects!
More information on http://www.fabriceharari.com


Thank you so much for your help.

Regards,

Carlos
Publicado el 12,agosto 2014 - 18:16
Hi,

I thank you very much for your help.

I did exactly as you said, however is not working for me I am sure that I am doing something wrong

My Window Name is WIN_Personnel

1. My Table is linked to a Query (Query Name is QRY_PERSONNEL).
2. Each field in my table is linked to the query.
3. Each field outside the table are also linked to the query.

Now

I am placing the FileToScreen(QRY_PERSONNEL, WIN_Personnel) under "Selecting a row of tbl_Personnel" because I could not find "Selection of a Line" as you mentioned under my table's code and nether under the "Optional Procedures" if I click on the ellipse button represented by [...]

When I enter FileToScreen(QRY_PERSONNEL, WIN_Personnel) and try to compile it doesn't allows me to compile because I get an error, if I comment out (//) this line I won't get the error.

I haven't tried the tutorial because it is to uncomfortable because I work out of a laptop and by trying one page out of the 400 and some pages is a nightmare, I hope you understand.

Thank you for your help

Best regards,

Carlos
Publicado el 13,agosto 2014 - 15:26
Hi Carlos

before going any further

we are in the WEBDEV forum
you are talking about a table in a Window...

Exactly what are we talking about? (in webdev, we don't have windows, we
have pages, so either we are in the wrong forum, or I'm just totally
confused)

As the answer to your question depends on WD/WB/WM, please let us know
what's what

By the way, the syntax is FileToScreen(window name, Source Name), if I
said the contrary before, sorry about that, I was working from memory

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

NEW: WXShowroom.com is available: Show your projects!
More information on http://www.fabriceharari.com




On 8/12/2014 10:16 AM, Carlos Antunez wrote:
Hi,

I thank you very much for your help.

I did exactly as you said, however is not working for me I am sure that
I am doing something wrong

My Window Name is WIN_Personnel

1. My Table is linked to a Query (Query Name is QRY_PERSONNEL).
2. Each field in my table is linked to the query.
3. Each field outside the table are also linked to the query.

Now
I am placing the FileToScreen(QRY_PERSONNEL, WIN_Personnel) under
"Selecting a row of tbl_Personnel" because I could not find "Selection
of a Line" as you mentioned under my table's code and nether under the
"Optional Procedures" if I click on the ellipse button represented by [...]

When I enter FileToScreen(QRY_PERSONNEL, WIN_Personnel) and try to
compile it doesn't allows me to compile because I get an error, if I
comment out (//) this line I won't get the error.

I haven't tried the tutorial because it is to uncomfortable because I
work out of a laptop and by trying one page out of the 400 and some
pages is a nightmare, I hope you understand.

Thank you for your help

Best regards,

Carlos
Publicado el 13,agosto 2014 - 16:54
Hi Fabrice,

Thanks so much for the response and for the help.
You are right, this is a Windows question, however, while I am waiting for my entire PC Soft studio (WINDEV,WEBDEV,WINMOB) arrives, I can only play around with WinDev's code because PC SOFT does not offer a WEB trial, besides, through out of what I have been reading, the code should be the same across all versions, so that's the reason why I have been asking for help.

I will be posting my question to the WinDev section for further help, and I hope that when I get my products from PC Soft, and if a questions reference WEBDev arises a helping person like you can further coach me.

Until then,

Thank you for your time

Best regards,

Carlos
Publicado el 13,agosto 2014 - 16:54
Hi Fabrice,

Thanks so much for the response and for the help.
You are right, this is a Windows question, however, while I am waiting for my entire PC Soft studio (WINDEV,WEBDEV,WINMOB) arrives, I can only play around with WinDev's code because PC SOFT does not offer a WEB trial, besides, through out of what I have been reading, the code should be the same across all versions, so that's the reason why I have been asking for help.

I will be posting my question to the WinDev section for further help, and I hope that when I get my products from PC Soft, and if a questions reference WEBDev arises a helping person like you can further coach me.

Until then,

Thank you for your time

Best regards,

Carlos