How to get DataGrid data after applying the column template

Hello @Team!

How can one get the data after applying the column's template, exactly as shown in the rendered grid?

This is for a custom grid export that I'm making.

I'm thinking maybe reflection to apply the template method in code.

Hi @kim,

Not sure what you mean by get the data after applying the template. Could you elaborate? What column and template are you referring to?

Yes, let's say you have column Name that contains property Name, but the column template actually does Name.ToLower() for example. How could I access the resulting data after the template is applied, which is the resulting Name.ToLower()?

I am not aware of any way to get that easily. Blazor templates are compiled to RenderFragments which are basically a delegate which is passed a RenderTreeBuilder. There it will do something like:


which won't be of any use to you.