MihaMarkic / BlazorDevExtreme

Blazor interop for DevExtreme library
MIT License
30 stars 5 forks source link

Example datagrid #9

Closed avandijk closed 5 years ago

avandijk commented 5 years ago

Hi,

I am looking into the library but I cannot find a way to assign a datasource to a datagrid. There is no immediate property 'datasource' available.

Can you give me a hint

Thx

MihaMarkic commented 5 years ago

Most probably you'll have to manage that yourself through javascript for the time being. Also, create a simple sample that I can take a look at.

sven5 commented 5 years ago

Here is a very simple and easy example of a Datagrid:

<DxDataGrid Columns="@(new[]{ new DevExpress.Ui.DxDataGridColumn { caption="Name of Customer", dataField="name", dataType="string" }, new DevExpress.Ui.DxDataGridColumn { caption="City", dataField="city", dataType="string" } })" FilterRow="@(new { visible = true })" DataSource="@(new[] { new { name = "John", city = "London"}, new { name = "Steve", city = "Berlin"}})" ShowRowLines="true" ShowBorders="true" Pager="@(new { visible = true })" />

@MihaMarkic You could add it to your demo project.

MihaMarkic commented 5 years ago

Hey @sven5, that's a really nice example. Do you want to create a PR yourself?

sven5 commented 5 years ago

Yes I could do that, but as you already know yourself I only have limited time. But maybe I can do that in the next days.

MihaMarkic commented 5 years ago

@sven5 I can wait and if you can't make it, let me know. Then I'll add it.

MihaMarkic commented 5 years ago

Added with #18, thanks for the code