LiveCode LessonsHow to - LiveCode Marketplace Products Data Grid HelperWhat Are The Available DGH Properties For Search And Find Action?

What Are The Available DGH Properties For Search And Find Action?

DGH uses a custom property set dghProp, to store data and state information for the Search/Find features.

  • saved data: contains the dgData saved by DGH when it turns the data grid in search mode
  • dg is in search mode: returns true if the data grid is in search mode
  • text to find: contains the text to find inside a form or table
  • find color: change the background text color of the found strings. Default is yellow
  • columns query list: contains a list of the columns to search in. Separator between columns is carriage return (cr) -
  • action found rows count label: set the long id of the label to use to display the found lines
  • action found rows text pattern: contains the text pattern to display inside the count lab.
    Use the #FoundRows# keyword to display the number of found rows
    Use the #RowsNumber# keyword to display the number of rows inside the data grid

 

Examples

How to change the find color?

set the dghProp["find color"] of grp "datagrid 1" to "orange"

How to change the columns query list?

set the dghProp["columns query list"] of grp "datagrid 1" to "Price" & cr & "Product"

How to define a label for displaying found rows count?

set the dghProp["action found rows count label"] of grp "datagrid 1" to the long id of field 1

How to use patterns in the count label field?

set the dghProp["action found rows text pattern"] of grp "datagrid 1" to "Found lines: #FoundRows# on #RowsNumber# rows"

How to populate another datagrid wit the saved data of the datagrid?

set the dgData of grp "datagrid 2" to the dghProp["saved data"] of grp "datagrid 1"

0 Comments

Add your comment

E-Mail me when someone replies to this comment