Atozed Forums
New demo: New IWDBLookupComboBox features - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Atozed Software Products (https://www.atozed.com/forums/forum-1.html)
+--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html)
+---- Forum: English (https://www.atozed.com/forums/forum-16.html)
+----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html)
+----- Thread: New demo: New IWDBLookupComboBox features (/thread-1497.html)



New demo: New IWDBLookupComboBox features - Alexandre Machado - 01-18-2020

In IW 15.1.11 we introduced 2 new properties in IWDBLookupComboBox and IWDBLookupListBox controls.

From the release notes:


Quote:DBLookupComboBox and DBLookupListBox new feature AutoSetListSourceCursor.

Allows automatic refresh/sync of DBLookupComboBoxes/ListBoxes when lookup DataSets are part of Master/Detail relationship


Here is an online demo showing how it works:

http://intraweb.net.br/DBLookupCombo/

This is the "gigantic" amount of code required to make this demo work (source in our github repo, link in the demo):

Code:
unit Unit61;

interface

uses
  Classes, SysUtils, IWAppForm, IWApplication, IWColor, IWTypes, Data.DB,
  IWCompLabel, Vcl.Controls, IWVCLBaseControl, IWBaseControl, IWBaseHTMLControl,
  IWControl, IWCompListbox, IWDBStdCtrls, IWCompGrids, IWDBGrids, IWCompButton,
  IWCompText, IWHTMLControls;

type
  TIWForm61 = class(TIWAppForm)
    cbCountry: TIWDBLookupComboBox;
    lblCountry: TIWLabel;
    cbState: TIWDBLookupComboBox;
    lblState: TIWLabel;
    cbCity: TIWDBLookupComboBox;
    lblCity: TIWLabel;
    IWText1: TIWText;
    IWURL1: TIWURL;
  private
  public
  end;

implementation

{$R *.dfm}

uses
  UserSessionUnit;

initialization
  TIWForm61.SetAsMainForm;

end.

yes, there is no code other than code created by IntraWeb application wizard itself when a new project is created.

Absolutely ZERO lines of code!

Enjoy  Big Grin