hkalbertl / jquery.appendGrid

The dynamic table input JavaScript plugin
https://appendgrid.azurewebsites.net
MIT License
148 stars 76 forks source link

How to set data-* attributes on column's input? #142

Closed ElHex closed 2 years ago

ElHex commented 3 years ago

Hello, I need to be able to have multiple attributes on a column, my goal is to have a select that pulls info from the database via AJAX (using maybe select2), it will return something like this:

date: "{\"start\":\"20210206000000\",\"end\":\"UNK\"}"
id: 1
participant: "{\"code\":{\"value\":135,\"description\":\"Influenza, high dose seasonal\",\"codeSystem\":\"2.16.840.1.113883.12.292\",\"codeSystemName\":\"CVX\"}}"
text: "Influenza, high dose seasonal"
total_count: 1

from column I would use id and text but I need to have avaliable the participant json data, thats why I want to add a data-participant and have it on the dom

is this possible?

hkalbertl commented 3 years ago

Hi ElHex,

You may assign "data-" attribute by using Custom Type. Please take a look on this pen for more. Hope it can help. Thanks!

JamoCA commented 3 months ago

The link to the "Custom Type" demo has been moved to https://appendgrid.azurewebsites.net/Demo/CustomType