473,405 Members | 2,373 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Casting integer type to real state in a DetailsView

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
Jun 14 '07 #1
1 1787
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.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Jason Huang" <Ja************@hotmail.comwrote in message
news:ug**************@TK2MSFTNGP05.phx.gbl...
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
Jun 14 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Reece Hart | last post by:
Here's the basic issue: PostgreSQL doesn't use indexes unless a query criterion is of exactly the same type as the index type. This occurs even when a cast would enable the use of an index and...
231
by: Brian Blais | last post by:
Hello, I saw on a couple of recent posts people saying that casting the return value of malloc is bad, like: d=(double *) malloc(50*sizeof(double)); why is this bad? I had always thought...
61
by: Ken Allen | last post by:
I am relatively new to .Net, but have been using VB and C/C++ for years. One of the drawbacks with VB6 and earlier was the difficulty in casting a 'record' to a different 'shape' so one could...
16
by: Enekajmer | last post by:
Hi, 1 int main() 2 { 3 float a = 17.5; 4 printf("%d\n", a); 5 printf("%d\n", *(int *)&a); 6 return 0; 7 }
3
by: Beta What | last post by:
Hello, I have a question about casting a function pointer. Say I want to make a generic module (say some ADT implementation) that requires a function pointer from the 'actual/other modules'...
2
by: Curious Trigger | last post by:
Hello, if have an asp.net web page with a detailsview. This detailsview uses a sqldatasource connecting to a sql server 2005 database with a select statement simliar to this one: SELECT...
0
by: Syd_Man | last post by:
Hello guys, I have some wiered problem ...I have a header details form where the header part is a datagrid and the details part is a Detailsview control. Once I select a record in the header it...
0
by: Syd_Man | last post by:
I have a Gridview that is passing value to a detailsview controls using DefaultValue="EmployeeID = {0}" syntax however if I use the same syntax for the Integer it raises some Conversion error. ...
22
by: Bill Reid | last post by:
I just noticed that my "improved" version of sscanf() doesn't assign floating point numbers properly if the variable assigned to is declared as a "float" rather than a "double". (This never...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.