Skip to content

Conversation

@daheOnGitHub
Copy link

In addition to the '{0}' in cellFormat I added support to access all
other row/data-attributes.
Simple add 'row.xyz', where xyz is the attribute-name. This value
replaces row.xyz.

Example:
Add a button with onClick to a cell in every row. Column should show clearText (name of device), onClick should execute function by deviceID:

Table-Conf:
...
cols: {
...
device: { index: 3, type: "string", friendly: "Device", format: "<i class="icon-rocket pull-right" style="cursor:pointer" onclick="DisplayLinkedDetails('Device','row.deviceId')"></i>{0}" },
...}

rows: [
...
{"id": "75f76cf1-16cf-4be8-810e-f28ef6fa5a37", "device": "test1", "deviceId": "b1e51d50-e8ef-41e1-bb62-dc78d01c416f"}
...
]

In addition to the '{0}' in cellFormat I added support to access all
other row/data-attributes.
Simple add 'row.xyz', where xyz is the attribute-name. This value
replaces row.xyz.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant