Smart UI Components & Libraries – Grid, Scheduler, Gantt, Kanban for Angular, React, Next.js, Vue, Blazor, JavaScript › Forums › Data Grid › How to add the data a Grid needs in HTML file
Tagged: Angular, Angular Table, blazor table, datatable, grid, react table, table, table-component, vanilla javascript table
- This topic has 3 replies, 2 voices, and was last updated 5 years ago by
admin.
-
AuthorPosts
-
November 25, 2020 at 8:44 am #101172
LC
MemberHello!
I am having some problems importing data with grid and need your kind help.
The problem is:
Currently I use @Input() gridVariables: String;
To import data used in the Grid.
But based on my limited Angular knowledge, gridVariables can be used in the corresponding HTML file.
But I looked it up the grid-related sample code does not see how to import Grid data in a similar way in an HTML file.
What seeing is basically importing data using a DataAdapter in .ts file.
Are there any relevant examples or documents to refer to for this problem?
thank you.
BR,
LCNovember 25, 2020 at 9:14 am #101173admin
KeymasterHi LC,
In order to data bind the Grid, you will need to set its dataSource property and set it to a DataAdapter or Array.
If you want to display a Grid from HTML Table, you can alternative use our Table component for Angular.
Best regards,
Peter Stoev
Smart UI Team
https://www.htmlelements.com/November 25, 2020 at 12:21 pm #101175LC
MemberHi Peter,
Please allow me to confirm:
Following your advice, I looked up some examples of smart-Table.
So what you’re saying is that users using smart-Grid components cannot currently add titles, data, etc. by editing.HTML files. Is it Right?
Similar to the function of smart-table, in the.html file, by editing <table>, <thead>, <tbody> and so on can add titles and data for smart-table, this function is not supported in the smart-grid component. May I ask if my understanding is correct?
Thank you very much for your timely reply.
BR,
LC
November 26, 2020 at 5:05 pm #101177admin
KeymasterHi LC,
The Table component is the one which can render TR, TD tags. It replaces the standard HTML Table. If you wonder about differences between Grid and Table, please refer to https://www.htmlelements.com/docs/grid-and-table/
Best regards,
Peter Stoev
Smart UI Team
https://www.htmlelements.com/ -
AuthorPosts
- You must be logged in to reply to this topic.