MihaMarkic / BlazorDevExtreme

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

Need DxDataGrid CellTemplate #14

Open sven5 opened 5 years ago

sven5 commented 5 years ago

Hi Miha,

I was successful in creating a Datagrid bound to simple object data. The grid works with filtering and paging. However, I need a custom cell and the possibility to customize cell templates and contents. What I've seen so far: using the cellTemplate property of DxDataDataGRidColumn only accepts string text and no dynamic content. The cellPrepared event doesn't get any parameters from js, would it be possible to pass the params to .NET?

Regards Sven

MihaMarkic commented 5 years ago

Will look into it

sven5 commented 5 years ago

I was able to workaround this. I created a column in the datasource with html markup that contains my template. When setting the encodeHtml property of DevExpress.Ui.DxDataGridColumn to false the template markup shows up correctly.

Nevertheless it would be great to have the parameter support for the widget event handlers.

Regards Sven

MihaMarkic commented 5 years ago

After poking a bit I see that this might be tricky to properly implement. The reason is that many arguments aren't compatible with Blazor/WebAssembly. Only atomic types such as numbers and strings are allowed. One way would be to ignore complex elements and pass only those that can be passed.

MihaMarkic commented 5 years ago

For the time being I'll add it to milestone 0.7