📘
TimeLine E3
  • TimeLine E3 Documentation
  • Framework
    • Introduction
    • DataSet Definition
    • Window Handling Object
      • Input/Output arguments
      • Open
      • BindDataControls
      • Item Changes
      • Item Search
      • MenuItemClicked
      • Print
      • ModuleOpened (BlueArrow)
      • BlueArrowArguments
      • New Row
      • Delete Row
      • Save
      • Transactions
      • Locking [deprecated]
      • Locking (new)
      • Resizing a response window
      • ParaPanel
      • Adding DMS Tab to a Module
    • BusinessObject
    • Controls
      • BindingFormat
      • LookupGrid and SearchDef
      • ComboBox
      • RadioButton
      • Multiline Textbox
      • xTextBoxSearch
      • xFileBrowse [v16+]
      • DxDispoColumn
      • DxProgressColumn
      • DxTemplateColumn
      • Change control caption programmatically
      • TabControl
      • Navigation
      • Enable controls programmatically
      • Enable a MenuItem programmatically
      • Filter search values
      • Jumping to another module
      • Messages, Notifications, Log, Exceptions, Translation
      • LoggerSink [deprecated]
      • Log
      • OpenFile, FolderBrowsing and SaveFile
      • Execute Actions while displaying an Hourglass
      • Using Progress
      • Async methods with progress bar
      • Wizard
      • Customizing controls using xBehaviors
      • TLProperty.AllowInReadOnly [v16+]
    • DataSet Operations
    • Business-related functionality
      • Getting the next primary key
      • Hybrids
      • Enums
      • Get Current User
    • SQL
    • SQL (using named parameters)
    • Advanced SQL
    • Expression Binding
    • Server-side logic & customization [v16+]
      • Service Hoster
      • Starting / stopping hosted services
      • Changes to scheduled jobs!
      • Business Object Proxies
      • Business Object API
    • Colors in Expression Bindings [v15+]
    • Theming
      • Icons
  • TimeLine Developer (TLD)
    • Debugging in TLD
    • Targets
    • Custom Project Rework [v16+]
  • TimeLine-specific LL functions
  • Stunnel proxy
    • Pre-requisites
    • 1. Initial setup
    • 2. Generate the server/web certificates
    • 3.a. Generating client certificates using the CSR flow
    • 3.b. Generate client certificates from the server console
    • 4. Setting up the E3 client connection
    • 5. Setting up the browser certificates
  • Configuration
    • Configuring the WCF timeout
  • Troubleshooting the E3 Bridge
  • [Deprecated]
    • TimeLine WEB - deprecated in v16+
      • Prerequisites for running the WASM modules on the server
      • Prerequisites for developing WASM modules with TLD
      • Creating a small web module with TLD
      • Terminal Configuration
    • Customization Examples - deprecated in v16+
    • Codestore [deprecated]
    • Configuring the scheduled jobs timeout - deprecated in v16+
Powered by GitBook
On this page
  • Item Searching
  • ItemSearched [deprecated]
  1. Framework
  2. Window Handling Object

Item Search

Item Searching

Used to set filter for a TextBoxSearch.

This approach is better than using SearchFilter property (in the XAML editor), because the filter may depend on one or more controls (DataGrid Column) which change their value(s) frequently.

public override bool ItemSearching(FrameworkElement sourceControl)
{
    bool result = base.ItemSearching(sourceControl);
    
    if (dgMaterial.IsKeyboardFocusWithin)      //TextBoxSearch in DataGrid
    {
        if (dgMaterial.SelectedColumn == dgMaterialSeriennr)     //DataGrid Column 
        {
            dgMaterialSeriennr.SearchFilter = GetSeriennrFilter();    //Set filter 
        }
        else if (dgMaterial.SelectedColumn == dgMaterialLagerorte)
        {
            dgMaterialLagerorte.SearchFilter = GetLagerorteFilter();    //Set filter 
        }
    }       
    return result;
}
public virtual string GetSeriennrFilter()
{
    var filter = "bestand > 0 AND seriennr.status <> 10";
    
    if (SelectedMaterialRow != null)
    {
        filter += string.Format(" AND seriennr.art_nr = '{0}' AND bestand_detail.lager_nr = {1}", SelectedMaterialRow.art_nr, SelectedMaterialRow.lager_nr);
    }
    
    return filter;
}

The following method can be found in wndTermin and it shows the IteamSearching approach for DataPanel Controls (xTextBoxSearch).

public override bool ItemSearching(FrameworkElement sourceControl)
{
    if (sourceControl == tbsGPNr)    //DataPanel Control
    {
        var persTyp = _context.pers_typ ?? 0;
        if (persTyp != 0)
            tbsGPNr.SearchFilter = string.Format("perstyp = {0}", persTyp);
    }

    return base.ItemSearching(sourceControl);
}

ItemSearched [deprecated]

This no longer exists in v16+.

At this point, the search-action has already taken place.

public override void ItemSearched(FrameworkElement sourceControl, xSqlResult result)
{
    base.ItemSearched(sourceControl, result);
    
    var textBoxSearch = sourceControl as xTextBoxSearch;
    if (textBoxSearch == null) return;

    if (sourceControl.Name == dgMaterialSeriennr.Name)    //DataGrid Column 
    {
        SetSerriennr(textBoxSearch.ResultRow);    //Set filter 
    }            
    return result;
}

The following method can be found in wndTermin and it shows the IteamSearched approach for DataPanel Controls (xTextBoxSearch).

public override void ItemSearched(FrameworkElement sourceControl, xSqlResult result)
{
    base.ItemSearched(sourceControl, result);
    
    xTextBoxSearch textBoxSearch = sourceControl as xTextBoxSearch;
    if (textBoxSearch == null) return;
    
    if (textBoxSearch == tbsSerienNrSearch)     //DataPanel Control 
    {
        OnSerienNrSearched(textBoxSearch);
        SelectSerienNrColumn();
    }
}

PreviousItem ChangesNextMenuItemClicked

Last updated 2 years ago

Please look at for the changes .

For SearchType="BrowseFile" functionality we now use the control.

xFileBrowse
ItemChanged