如何将数据表绑定到gridview [英] how to bind datatable to gridview

查看:88
本文介绍了如何将数据表绑定到gridview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友们

我有网格视图我不会通过defalut来删除任何列。然后在代码后面我已经动态获取数据表。我想将这些数据绑定到datatable。我的数据表有前三列有价值,之后该列没有值,我想为所有其他列设置文本框。



我的表格如下

Hi friends
I have gridview that i dont delcare any column by defalut. then in code behind i have get datatable dynamically. and i would like to bind these data to datatable. My datatable has first three column with value and after that column dont have the value and i want to set textboxes for all other columns.

My table is like below

AdmissionNumber  RollNumber       Name        subject1        subject2   subject3   


101                1001             Ram                 

102                1002             Bala     


103                1003             kumar 





在上表中,我想为subject1和subject2以及subject3添加所有文本框student.I无法在aspx页面的gridview中预定义列,因为没有主题是可更改的。



In the above table I want to add textboxes for subject1 and subject2 and subject3 for all the student.I cannot predefined the column in gridview at aspx page, because no of subject is changable.

推荐答案

老实说,再回答问题并回答是不好的很多次。请参阅: http://www.codeproject .com / search.aspx?q = ASP.NET + bind + GridView +数据库& doctypeid = 1%3b4%3b5 [ ^ ]。



-SA
Honestly, it's not good to answer again the question asked and answered so many times. Please see: http://www.codeproject.com/search.aspx?q=ASP.NET+bind+GridView+database&doctypeid=1%3b4%3b5[^].

—SA


这篇关于如何将数据表绑定到gridview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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