AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

HTML5Builder

Ein Thema von manfred_h · begonnen am 20. Aug 2013
Antwort Antwort
manfred_h

Registriert seit: 4. Nov 2005
Ort: Basel
442 Beiträge
 
Delphi XE2 Enterprise
 
#1

HTML5Builder

  Alt 20. Aug 2013, 15:42
Hallo zusammen

Habe das Problem das ich mit einer MList Daten aus einer MySQL DB holen und
dann auf einer 2ten Seite gerne die Details hätte.
( In der MList sind nur die Namen, für die Adresse hätte ich gerne die 2te Seite )

Das Problem ist das Die "Details" ( basiert auf der gleichen Tabelle ) nicht gefiltert werden. Es wird immer der erste Datensatz angezeigt.

( Basiert auf diesem Bsp. von Embarcadero )

Das Füllen der MList geht gut.
Code:
    function memberBeforeShow($sender, $params)
    {
         function fillMList($sender, $params)
            {
            global $dm;
//                 Get the items array from the MList (you cannot work with the property directly).
                $items = $this->MList1->Items;

//                 Add all the item to the items array.
//                 NOTE: items are associative arrays, see the documentation of the Items property.
                   $this->$dsMEMBER->DataSet->first();
                   while( ! $this->$dsMEMBER->DataSet->EOF )
                   {
                          $items[] = array("Name" => $this->$dsMEMBER->DataSet->Fields["F_NAME"]);
//                     NOTE: This example adds an item with the value of its caption field filled with the value
//                     of the ‘column_name’ column from the DataSource.
//                     See the documentation of the Items property for a list of available item fields.

                          $this->$dsMEMBER->DataSet->next();
                   }

//                 Save the items array back to the property.
                $this->MList1->Items = $items;
            }
    }
Beim anklicken der MList wird dies ausgeführt:
Code:
    function MList1Show($sender, $params)
    {
        $items = $this->MList1->Items;
        for($i = 0; $i < count($items); $i++)
        {
        $items[$i]['Link'] = 'member_detail.php?id='. $items[$i]['Link'] ;
        }
        $this->MList1->Items = $items;
    }
Auf der Detailseite wird folgendes aufgerufen:
Code:
    function member_detailPageCreate($sender, $params)
    {
     if( !empty($_GET['id']))
        {
        global $dm;
        $this->$dsMEMBER->close();
        $this->$dsMEMBER->filter = "ID=" . $_GET['id'];
        $this->$dsMEMBER->open();
        }
    }
Wäre schön wenn ich eine Lösung finden würde.
Habe schon überall Gegoogelt...

Grüsse aus Basel
Manfred
  Mit Zitat antworten Zitat
Antwort Antwort

 

Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 01:48 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz