Create a data grid

Create a grid from data gathered by the event logger.
TIP: Instead of creating this widget from scratch, you can add
Alarms Event Logger
from
Template Libraries
and then modify it accordingly.
  1. Create a data grid:
    1. In
      Project view
      , right-click
      MainWindow (type)
      and select
      New
      Data controls
      Data grid
      .
    2. In
      Properties
      , create a dynamic link between the
      Model
      variable and
      ProjectName
      DataStores
      EmbeddedDatabase1
      .
    3. Create a complex dynamic link:
      StringFormatter1
      Format
      SELECT ActiveState_Id, AckedState_Id, ConfirmedState_Id, Time, Severity, {0:sql_identifier} AS Message FROM "EventLogger1" ORDER BY "Time" DESC
      {0} StringFormatter1
      Format
      Message_{0}
      {0} DynamicLink
      {Session}/User/LocaleIds[0]
      For more information about dynamic links, see Create dynamic links.
  2. Configure data grid columns:
  3. Configure the active state column:
    1. In
      Properties
      , double-click
      DataGridColumn1
      and enter
      ActiveState
      .
    2. Under
      DataItemTemplate
      , create a complex dynamic link:
      KeyValueConverter1
      Source DynamicLink
      {Item}/ActiveState_Id
      For more information about dynamic links, see Create dynamic links.
    3. Set
      Title
      to
      Active State
      .
  4. Configure the acknowledged state column:
    1. In
      Properties
      , next to
      Columns
      , select
      Add
      and select
      Text column
      .
    2. Double-click
      DataGridColumn1
      and enter
      AckedState
      .
    3. Under
      DataItemTemplate
      , create a complex dynamic link:
      KeyValueConverter1
      Source DynamicLink
      {Item}/AckedState_Id
      For more information about dynamic links, see Create dynamic links.
    4. Set
      Title
      to
      Acked State
      .
  5. Configure the confirmed state column:
    1. In
      Properties
      , next to
      Columns
      , select
      Add
      and select
      Text column
      .
    2. Double-click
      DataGridColumn1
      and enter
      ConfirmedState
      .
    3. Under
      DataItemTemplate
      , create a complex dynamic link:
      KeyValueConverter1
      Source DynamicLink
      {Item}/ConfirmedState_Id
      For more information about dynamic links, see Create dynamic links.
    4. Set
      Title
      to
      Confirmed State
      .
  6. Configure the time column:
    1. In
      Properties
      , next to
      Columns
      , select
      Add
      and select
      Text column
      .
    2. Double-click
      DataGridColumn1
      and enter
      Time
      .
    3. Create a dynamic link between
      Text
      and
      Aliases
      {Item}
      PointedNode
      Time
      NOTE: Enter
      Time
      in the
      Insert the dynamic link sub-path...
      field.
      For more information about dynamic links, see Create dynamic links.
    4. Set
      Title
      to
      Time
      .
  7. Configure the message column:
    1. In
      Properties
      , next to
      Columns
      , select
      Add
      and select
      Text column
      .
    2. Double-click
      DataGridColumn1
      and enter
      Message
      .
    3. Create a dynamic link between
      Message
      and
      Aliases
      {Item}
      PointedNode
      Message
      NOTE: Enter
      Message
      in the
      Insert the dynamic link sub-path...
      field.
      For more information about dynamic links, see Create dynamic links.
    4. Set
      Title
      to
      Message
      .
  8. Configure the severity column:
    1. In
      Properties
      , next to
      Columns
      , select
      Add
      and select
      Text column
      .
    2. Double-click
      DataGridColumn1
      and enter
      Severity
      .
    3. Create a dynamic link between
      Severity
      and
      Aliases
      {Item}
      PointedNode
      Severity
      NOTE: Enter
      Severity
      in the
      Insert the dynamic link sub-path...
      field.
      For more information about dynamic links, see Create dynamic links.
    4. Set
      Title
      to
      Severity
      .
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.