ISEdit.CustomLookupShowCode

Description

This property is True if the dialog window for the lookup item selection should contain the code column. This property is not accessible in the Object Inspector.

Syntax

object.CustomLookupShowCode

Part Attribute Type Description
object Required
The object always implements the ISEdit interface

Return Value

bool

Example

Initialize the edit control by the custom lookup array and LookupStrParams and allow to show Code column in the lookup dialog window.

Sub Main()
  Dim aEdit
  Dim aFilter
  Dim aProviders, aProvider
  Dim aLookupArray

  Set aEdit = Form.Controls_("edtInform")
  
  set aFilter = Profile.CreateProvidersFilter
  aFilter.Category = 2 'pcProvider  
  set aProviders = Profile.LoadProvidersByFilter(aFilter)
  
  ReDim aLookupArray(aProviders.Count, 2) 
  
  for i = 0 to aProviders.Count - 1
    set aProvider = aProviders.Item(i)
    aLookupArray(i, 0) = aProvider.Id
    aLookupArray(i, 1) = aProvider.FullName 
  next 'i 
  
  aEdit.LookupArray = aLookupArray
  aEdit.LookupStrParams = "SortMode=ById"
  aEdit.CustomLookupShowCode = true
  
  if aProviders.Count > 0 then
   set aProvider = aProviders.Item(0)
   aEdit.AsVariant = aProvider.Id 
  end if  
End Sub 
Note: This macro should be executed in any event handler of the form control.

Version information

Added in v7.8.0