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.
-
Create a data grid:
-
In Project view, right-click MainWindow (type) and select .
-
In Properties, create a dynamic link between the Model variable and .
-
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.
Configure data grid columns:
-
Configure the active state column:
-
In Properties, double-click DataGridColumn1 and enter ActiveState.
-
Under DataItemTemplate, create a complex dynamic link:
- KeyValueConverter1
-
- Source DynamicLink
- {Item}/ActiveState_Id
For more information about dynamic links, see Create dynamic links.
-
Set Title to Active State.
-
Configure the acknowledged state column:
-
In Properties, next to Columns, select
and select Text column.
-
Double-click DataGridColumn1 and enter AckedState.
-
Under DataItemTemplate, create a complex dynamic link:
- KeyValueConverter1
-
- Source DynamicLink
- {Item}/AckedState_Id
For more information about dynamic links, see Create dynamic links.
-
Set Title to Acked State.
-
Configure the confirmed state column:
-
In Properties, next to Columns, select
and select Text column.
-
Double-click DataGridColumn1 and enter ConfirmedState.
-
Under DataItemTemplate, create a complex dynamic link:
- KeyValueConverter1
-
- Source DynamicLink
- {Item}/ConfirmedState_Id
For more information about dynamic links, see Create dynamic links.
-
Set Title to Confirmed State.
-
Configure the time column:
-
In Properties, next to Columns, select
and select Text column.
-
Double-click DataGridColumn1 and enter Time.
-
Create a dynamic link between Text and
Note: Enter Time in the Insert the dynamic link sub-path... field.
For more information about dynamic links, see Create dynamic links.
-
Set Title to Time.
-
Configure the message column:
-
In Properties, next to Columns, select
and select Text column.
-
Double-click DataGridColumn1 and enter Message.
-
Create a dynamic link between Message and .
Note: Enter Message in the Insert the dynamic link sub-path... field.
For more information about dynamic links, see Create dynamic links.
-
Set Title to Message.
-
Configure the severity column:
-
In Properties, next to Columns, select
and select Text column.
-
Double-click DataGridColumn1 and enter Severity.
-
Create a dynamic link between Severity and .
Note: Enter Severity in the Insert the dynamic link sub-path... field.
For more information about dynamic links, see Create dynamic links.
-
Set Title to Severity.