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.- Create a data grid:
- InProject view, right-clickMainWindow (type)and select .
- InProperties, create a dynamic link between theModelvariable 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:
- InProperties, double-clickDataGridColumn1and enterActiveState.
- UnderDataItemTemplate, create a complex dynamic link:
- KeyValueConverter1
- Source DynamicLink
- {Item}/ActiveState_Id
For more information about dynamic links, see Create dynamic links. - SetTitletoActive State.
- Configure the acknowledged state column:
- InProperties, next toColumns, select and selectText column.
- Double-clickDataGridColumn1and enterAckedState.
- UnderDataItemTemplate, create a complex dynamic link:
- KeyValueConverter1
- Source DynamicLink
- {Item}/AckedState_Id
For more information about dynamic links, see Create dynamic links. - SetTitletoAcked State.
- Configure the confirmed state column:
- InProperties, next toColumns, select and selectText column.
- Double-clickDataGridColumn1and enterConfirmedState.
- UnderDataItemTemplate, create a complex dynamic link:
- KeyValueConverter1
- Source DynamicLink
- {Item}/ConfirmedState_Id
For more information about dynamic links, see Create dynamic links. - SetTitletoConfirmed State.
- Configure the time column:
- InProperties, next toColumns, select and selectText column.
- Double-clickDataGridColumn1and enterTime.
- Create a dynamic link betweenTextandNOTE: EnterTimein theInsert the dynamic link sub-path...field.For more information about dynamic links, see Create dynamic links.
- SetTitletoTime.
- Configure the message column:
- InProperties, next toColumns, select and selectText column.
- Double-clickDataGridColumn1and enterMessage.
- Create a dynamic link betweenMessageandNOTE: EnterMessagein theInsert the dynamic link sub-path...field.For more information about dynamic links, see Create dynamic links.
- SetTitletoMessage.
- Configure the severity column:
- InProperties, next toColumns, select and selectText column.
- Double-clickDataGridColumn1and enterSeverity.
- Create a dynamic link betweenSeverityandNOTE: EnterSeverityin theInsert the dynamic link sub-path...field.For more information about dynamic links, see Create dynamic links.
- SetTitletoSeverity.
Provide Feedback