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

Best approach for translating cell content

1 Answer 30 Views
Grid
This is a migrated thread and some comments may be shown as answers.
NS
Top achievements
Rank 1
NS asked on 02 Jul 2014, 06:58 AM
Hi,
I have a datasource that contains an object (string) with a certain Order status code.
(e.g. "N", "A")

In my old asp.net application, I used to translate this code to a resource file in my application. (e.g. "N", becomes "New")
I used the onitemdatabound event (server side), to alter the contents of this cell.

What is the best approach to do this with asp.net mvc and kendo UI?
Would it be better that my WCF response already contains these translations? (however, I don't want to pass the culture to the WCF service I guess)
Or can kendo.ui Grid also change cell values (with some sort of jquery function that reads out a a resource file in my project?)

Thanks,
Nicolas

1 Answer, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 04 Jul 2014, 05:19 AM
Hello Nocalas,

The best approach would be to directly send translated items to the Grid (your WCF service return them in such way that they do not need transformation). If this is not possible then I would suggest you to use a template column which calls a JavaScript function that will handle this work. Here is a small example:

http://docs.telerik.com/kendo-ui/getting-started/using-kendo-with/aspnet-mvc/helpers/grid/faq#how-do-i-use-a-javascript-function-in-a-column-client-template

Regards,
Petur Subev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
NS
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Share this question
or