Ticket T651630
Visible to All Users

The second approach of the A344 Knowledge Base article does not work

created 7 years ago

[DevExpress Support Team: CLONED FROM A344: How to filter lookup records using another cells value as a condition]
Does this sample code need to be updated? "Way 2" doesn't work. After you hit the dropdown in Medication Name once, any time you drop the list down after that, it is empty.  "Way 1" is fine.

Comments (2)
DevExpress Support Team 7 years ago

    Hello Ron,

    Please check that ADOConnecton is connected to a DataBase file and all DataSets (TADOTable and TADOQuery) are active.
    If this does not help, try the following:

    1. Place the DataBase file to the "C:\Temp" directory;
    2. Connect ADOConnection to it and activate all DataSets;
    3. Save the project and provide us with it.
    RS RS
    Ron Schuster 1 7 years ago

      attached

      Answers approved by DevExpress Support

      created 7 years ago

      Try adding the Root.Clear method call to the viewMainInitEdit procedure before applying a filter to LookupComboBox's Grid and keep me informed of your results.

      Delphi
      ... with LGrid.DataController.Filter do begin Root.Clear; Root.AddItem(colClassID, foEqual, MedClassValue, VarToStr(MedClassValue)); ... with LGrid.DataController.Filter do begin Root.Clear; Root.AddItem(colNameID, foEqual, MedNameValue, VarToStr(MedNameValue)); ...
        Comments (1)

          I had the same issue and Root.Clear fixed the problem.

          thanks

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.