unosquare / tubular-react

Material UI table with local or remote data-source. Featuring filtering, sorting, free-text search, export to CSV locally, and aggregations.

Home Page:https://unosquare.github.io/tubular

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to create a dynamic column model and table?

srinivasmangipudi opened this issue · comments

Is there an ability to create the table/grid dynamically, when not knowing what kind of data it will be.

Like for example, if I am writing a utility to import and parse excel files, how can I construct the tubular-grid component.

thanks

Hi @srinivasmangipudi ,

Please take a look at: https://github.com/unosquare/tubular-react/blob/master/sample/src/localDataGrid.tsx

That's an example of how to use tubular-react with a local data source. I think you can create as many columns as you want (dynamic) and then you can simply create the data source as array that matches your columns. If you don't know the column type, you can treat them as strings.

Hi @srinivasmangipudi,
can we close this one?