Solved

datagrid binding

Posted on 2004-09-15
4
242 Views
Last Modified: 2010-04-23
hi

   I have a datagrid. There is a field in datagrid corresponding to "Status" field in database which is either 0 or 1.

but when i bind that to datagrid in that field i want to display either "on" or "Off" corresponding to o or 1.

any idea how to do that.

thanks
sandeep
0
Comment
Question by:sandeep437
4 Comments
 
LVL 2

Accepted Solution

by:
ahmadfuwad earned 125 total points
ID: 12072707
Just write this querry for getting on and off instead of 0 and 1

select case when status=0 then 'on' else 'off' end Col from customer
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now