BlazorTable icon indicating copy to clipboard operation
BlazorTable copied to clipboard

How Data can be Dynamic in Table like <TItem>?

Open anjan-cele opened this issue 4 years ago • 1 comments
trafficstars

How Data can be Dynamic in Table like <TItem>?

In Current Example, Data is coming thru PersonData which is a single model, What if I am using this table as plugin or shared component and data can come from one model on click of one link and if i click on 2nd link, then the data can come from different model/datasource. Is there any generic <T> kind of implementation for data's?

anjan-cele avatar Feb 03 '21 11:02 anjan-cele

You could implement a generic interface and have the table bind to interface properties. This will work if you can model your data with a single interface. Otherwise you'll probably need to use reflection or something of the sort.

niko-la-petrovic avatar Feb 28 '21 20:02 niko-la-petrovic