Render enum as string in ClientTemplate in Grid

0 Answers 5 Views
Grid Templates
Paul
Top achievements
Rank 1
Paul asked on 28 Jun 2024, 12:27 AM

The following grid column definition renders the enum as a string:

columns.Bound(p => p.SomeEnum);

The ajax call actually returns an int for the enum but the grid does some magic and shows the enum string.

If I need to customize the output and use a ClientTemplate, it renders as an int though:

columns.Bound(p => p.SomeEnum).ClientTemplate("foo #=SomeEnum#");

How can I get my ClientTemplate to render the string version of the enum?

No answers yet. Maybe you can help?

Tags
Grid Templates
Asked by
Paul
Top achievements
Rank 1
Share this question
or