Casting integer type to real state in a DetailsView

  • Thread starter Thread starter Jason Huang
  • Start date Start date
J

Jason Huang

Hi,

In my C# Net 2.0, in a DetailsView I have a row TestStatus, and the output
will be interger 0, 1,
where the 0 presents Pass, 1 presents Fail.
What do I need to do so that the output will be "Pass" and "Fail", not the
integer style 0,1?
Thanks for help.


Jason
 
Jason,

Are you looking to have the text value in the column? Generally
speaking, for something like this, you want to make the type of the column a
DataGridViewComboBoxColumn. The following section of the MDSN documentation
titled "How to: Bind Objects to Windows Forms DataGridView Controls" shows
you how to do it:

http://msdn2.microsoft.com/en-us/library/y0wfd4yz.aspx

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top