LookupGrid and SearchDef

LookupGrid/SearchDef

These controls are definded in a xaml-file and based on type they are:

  • Type 10 -> LookupGrid

  • Type 20 -> SearchDef

Insert a new LookupGrid

Naming convention for LookupGrids: prefix lg_Name.lgd Naming convention for SearchDefs: Name.shd

Contents of a xaml-file for LookupGrid/SearchDef:

  • Type: 10-LookupGrid, 20-SearchDef;

  • SearchFields: fields to be searched in

  • DisplayFields: fields which will be displayed in the search response

  • Titles: titles of the fields from the db, which will be displayed in the Lookup

  • SqlStmt: the sql-statement which will bring the data into the Lookup

    • if no SqlStmt is written, the DataSource of the LookupGrid will be programmatically set in BindDataControls() (see Window Handling Object)

  • ReturnValues: field which will complete the value of the LookupGrid

  • Orderfield: field(s) by which the sql-statement will be ordered

  • Tables: table in which the search will take place

Result

Translating hardcoded SQL values in LG

Steps for translating hardcoded SQL values:

  • 1. Add the hardcoded value to LookupGrid

For adding a hardcoded value, the sql-statement behind the lookupgrid should contain an union-sql between the hardcoded value and values that are retrieved from the database.

  • 2. Translate hardcoded value

Translations can be:

    • Standard -> can be found in busGenericMethods, from which the translation can be called in Opened()-WHO method. The TranslateLookUpColumns-method Translates the given columns of a given LookUpGrid

This is the implementation in BusGenericMethods:

TranslateDataTable translates the given columns of a given DataTable

    • Individual -> creating an own WHO-method for lookupGrid translation

Last updated