datagrid binding

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
sandeep437Asked:
Who is Participating?
 
ahmadfuwadConnect With a Mentor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.