This is a migrated thread and some comments may be shown as answers.

Translating Data Source

1 Answer 121 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Randy
Top achievements
Rank 1
Randy asked on 29 Dec 2011, 12:11 AM
I have a webservice that returns a list of objects. Most of the fields are enums, or rather integers when they show in the grid. Is there a way to process that field and display it as a more human readable format? I figure I will have to maintain a integer to string conversion function that matches the enums of the webservice, but how can I get that function to be called?

The only way I can see it working now is to create a new object and copy the rows over one by one translating as I go. I am hoping for something easier.

Thanks
Randy

1 Answer, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 29 Dec 2011, 05:03 PM
Hello Randy,

You can set template for the column and call the function that converts enums. For example check the following jsFiddle:
http://jsfiddle.net/rusev/P5Cjg/7/

Regards,
Nikolay Rusev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Randy
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Share this question
or