在GridView中需要帮助 [英] Need Help in gridview

查看:67
本文介绍了在GridView中需要帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我正在sql中执行以下查询

Hi all

I am executing the below query in sql

SELECT Emp_Name,
SUM(CASE WHEN present = 1 THEN 1 ELSE 0 END) AS [total Present Count],
SUM(CASE WHEN absent = 1 THEN 1 ELSE 0 END) AS [total Absent Count],
SUM(CASE WHEN EL = 1 THEN 1 ELSE 0 END) AS [EL Count],
SUM(CASE WHEN CL = 1 THEN 1 ELSE 0 END) AS [CL Count],
SUM(CASE WHEN ML = 1 THEN 1 ELSE 0 END) AS [ML Count]


from attendance
GROUP BY Emp_Name



我得到的输出就像



and i am getting the output like

Dev     2   0   0   0   0
Manish  1   1   0   1   0
nilam   1   0   0   0   0



我想在VB.NET中的gridview中显示相同的内容.请告诉我该怎么做,因为我尝试过,但是它只显示了复选框



i want to display the same thing in gridview in VB.NET.please tell me how to do because i tried but it''s showing only checkboxes

推荐答案


如果您在asp.net中遇到此问题,那么这里是一个解决方案

打开编辑列并选择列名称,然后单击将该字段转换为TemplateField"
然后单击确定"并转到编辑模板".选择列名称,然后在itemTemplate中将其命名为
复选框将其更改为标签.

构建您的应用程序并尝试.

祝您编码愉快.
Hi
If your are facing this problem in asp.net then here is one solution

open edit colums and select the column name and click in the ''convert this field into a TemplateField''
and click on ok and goto edit Templates Select the column name and in the itemTemplate it might be
Check box change it to lable.

Build your application and try.

Happy Coding..


这篇关于在GridView中需要帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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