Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
5
Erster Beitrag:
vor 8 Jahren, 4 Monaten
Letzter Beitrag:
vor 8 Jahren, 4 Monaten
Beteiligte Autoren:
DarrenF, Fabrice Harari.pcs.crosspost, Fabrice Harari

Looper control question.

Startbeitrag von DarrenF am 08.05.2009 15:28

Hi all,

I have a question regarding a Looper control that I'm trying to get working - it's my first Looper Control, so go easy on me :confused:

I have a Looper Control on a window and it is linked (via the Content tab) to a file (let's call it Specification_Definition) and there are 4 fields from this file defined in the looper control. Now my difficulty comes when I want the user to be able to select a product in each row in the looper (the product file isn't related in the Analysis). To this this end, I've tried placing a combo box in the looper which lists the Products for selection - so far so good (I thought)!

This combo box lists the required products and allows the selection of a product, but when I move focus to a different row of the looper, the selection of the product in the combo is lost. I thought the selection would be retained :confused:

I thought I would be able to let the user make their product selections on each of the rows they wanted to, then (when they press an OK button for example), I could work through the looper rows simply creating a Specification_Quote (with Quote_Lines) for each row of the looper - but no :(

Do you have any thoughts? Do I need to maintain the Product ID's that have been selected in a separate array (that maps across to the looper), for instance or is there an esier way that I'm missing?

Thanks in advance...

Antworten:

Hi Darren...

your looper is directly linked to a file, and in that case (same as a table directly linked to a file), only the visible elements/lines are loaded in memory at any given time.

Which means that any memory/calculated/entered content on a line that becomes not visible (scroll down situation) is lost. In your case, it's the selection in your combo...

So you can either use a MEMORY looper and load it programatically (in that case, everything is loaded in memory and your combo selection will stay with your lines) _OR_ you can keep your FILE looper and manage a separate array or memory zone in which you store the line selected (in the code selection of a line of the combo) and from which you take the selected line in the code display of a line of the looper...

Best regards



von Fabrice Harari - am 08.05.2009 22:30
Hi,

Okay, I've coded an array (memory zone) that holds the product ID that is selected by the operator.

I may be missing something - I know I can display the selected product in the combo box when the looper row is selected (Row Selection), but is there a technique to show the product that has been selected in the combo box even when the looper row isn't selected?

Cheers...

von DarrenF - am 12.05.2009 01:21
Hi Darren,

as I was saying:
"... in the code display of a line of the looper..."

Not the the line selected, the Code for the DISPLAY OF A LINE

Best regards

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

More information on http://www.fabriceharari.com


DarrenF wrote:
> Hi,
> Okay, I've coded an array (memory zone) that holds the product ID that is selected by the operator.
> I may be missing something - I know I can display the selected product in the combo box when the looper row is selected (Row Selection), but is there a technique to show the product that has been selected in the combo box even when the looper row isn't selected?
> Cheers...
>
Message forwarded from pcsoft.us.windev

von Fabrice Harari.pcs.crosspost - am 12.05.2009 09:28
Hi Fabrice,

Thanks for getting back in touch - sorry I didn't pick-up on the row display bit of your reply - now I've got it - I'll give it a try asap :spos: I'm sure it'll work...


von DarrenF - am 12.05.2009 16:18
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.