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

Simple Column Translation - Code to Text

1 Answer 25 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Roy
Top achievements
Rank 1
Roy asked on 19 Jul 2010, 06:34 PM

Hi

This is trivial stuff but I can't find an answer in all your resources.

I have a database field containing an integer code e.g. Priority with 0 for High, 1 for Medium and 2 for Low.
The codes mean nothing to the user so I need to translate the code in this column into text. Also, when sorting the column I'd like it to use the underlying code and not the text so the ordered data appears as High-Medium-Low not text sorting which would give High-Low-Medium.

If you can provide some tips on searching your resources for this easy stuff that would be appreciated! A beginners guide maybe

Thanks
RoyS

1 Answer, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 22 Jul 2010, 01:56 PM
Hello Roy,

A sample demonstrating the simpliest approach is attached.

All the best,
Pavel Pavlov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Roy
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Share this question
or