通过数据库水平地将单个列多次绑定到gridview [英] Binding a single column multiple times to the gridview through database horizontally

查看:58
本文介绍了通过数据库水平地将单个列多次绑定到gridview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开展一个大学项目。在这个项目中我正在创建一个出勤和出勤报告的页面。在考勤报告页面中,我需要通过保持名称列不变,将日期列三次绑定到gridview对于它。请快速建议我一些代码....

I am working on a project which is on college.In this project am creating a page for attendance and attendance report.In the attendance report page i need to bind the date column three times to the gridview by keeping the name column constant for it.Please suggest me some code ....quickly.

推荐答案

通过命名为date1,date2和Date3并在前端为gridview选择SQL中的列更改他们的标题只有日期名称。



在gridview栏目部分添加类似的内容,多次添加单列。





select your columns from SQL by naming as date1, date2 and Date3 and in front end for gridview change their caption have the name as date only.

add something like this in your gridview columns section for adding single column multiple times.


<asp :BoundField HeaderText="Date 1" DataField="Date" />
<asp :BoundField HeaderText="Date 2" DataField="Date" />
<asp :BoundField HeaderText="Date 3" DataField="Date" />


这篇关于通过数据库水平地将单个列多次绑定到gridview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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