Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to define columns with properties for an empy table tag #6

Open
mcordova1967 opened this issue Jan 1, 2022 · 0 comments
Open

Comments

@mcordova1967
Copy link

Hello, is there a way to define the structure of the table with code in order to bind it with a JSON array, I mean like with the DataTable widget, discarding the use of jQuery of course, I like the fact that your widget does not require additional frameworks or CSS:

$('#datagrid').DataTable( {
data: DataSet,
columns: [
{ title: "ID", data: "customerid" },
{ title: "Compañia", data: "companyname" },
{ title: "Contacto", data: "contactname" },
{ title: "Teléfono", data: "phone" },
{ title: "País", data: "country" }
]
} );

The HTML would be like this:

Thank you,
Martin

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

No branches or pull requests

1 participant