Solved

datagrid binding

Posted on 2004-09-15
4
241 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
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

743 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

18 Experts available now in Live!

Get 1:1 Help Now