Click here to Skip to main content
16,012,223 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In database gender store as bit. I want to fill listview,so that instead of showing gender as bit field i want to show it as male or female
Posted
Updated 26-May-11 21:30pm
v2

Does not compute.
Why would you want to fill a column with someones gender?
How do you you know their gender?
Have you asked them?
And what if the gender changes, or is neuter?
I don't think you have thought this through.


The field "Sex" I can understand, and Male or Female is fine, for someones sex is constant, barring surgery.

Gender is much more difficult to assess.
Masculine or Feminine, it can be hard to tell, and is highly subjective.

A man may be feminine, but feel as though he is masculine, how would you deal with that?
 
Share this answer
 
well why are you using ListView to do that?
I think there are better options like binding those values in radio button or even a dropdown list.
 
Share this answer
 
It should not be too difficult. There are a number of options to do this actually.

One way is to simply set set all 0 and 1's in the binding collection to the appropriate tags (male or female) and then attach the collection to the ListBox as the Datasource.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900