如何在gridview中设置状态为1的Active instate和0的非活动instate。 [英] how to set the status Active instate of 1 and inactive instate of 0 in gridview.

查看:40
本文介绍了如何在gridview中设置状态为1的Active instate和0的非活动instate。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从数据库中取出布尔值我希望显示它处于活动状态和非活动状态...





请帮帮我朋友..

im taking boolean value from data base i want show it active and inactive...


please help me friends..

推荐答案

通过SQL语句执行此操作的最简单方法:

The easiest way to to do it via the SQL statement:
SELECT CASE WHEN activeStatus = 0 THEN 'Inactive' ELSE 'Active' END FROM MyTable

或者更好地使用单独的表格来表示图例并使用JOIN在您的SQL中。

Or better use a separate table for the legends and use a JOIN in your SQL.


这篇关于如何在gridview中设置状态为1的Active instate和0的非活动instate。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆