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

The enum shows as int not name string in Grid?

3 Answers 163 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Pam Redrum
Top achievements
Rank 1
Pam Redrum asked on 10 Jun 2010, 07:14 AM
I have a field in Grid's data used
    public enum WildOptions 
    { 
        StartWith = 1, 
        EndWith = 2, 
        EqualTo = 3, 
        Contains = 4, 
    } 
In showing the Grid shows as 1,2,3,4 not "StartWith" or so.
Is there something I forgot?


3 Answers, 1 is accepted

Sort by
0
Reggie Pangilinan
Top achievements
Rank 1
answered on 14 Jun 2010, 10:58 AM
anyone has solved this? i am having the same problem
0
Joao Cardoso
Top achievements
Rank 1
answered on 14 Jun 2010, 03:29 PM

I'm guessing that you will need to create a template column and to decide the contents of if based on the value of the property. Remember that when databinding you are doing it to the value of the property. And to that fact, you probably want to show the user a user friendly description, not an enum description that some times may have a cryptic meaning.

Just my 2 cents.

Cheers

Joao Cardoso

0
david
Top achievements
Rank 1
answered on 04 Nov 2010, 10:35 AM
check out this forum topic on the same matter
Tags
Grid
Asked by
Pam Redrum
Top achievements
Rank 1
Answers by
Reggie Pangilinan
Top achievements
Rank 1
Joao Cardoso
Top achievements
Rank 1
david
Top achievements
Rank 1
Share this question
or