如何填充Gridview控件 [英] How to Fill Gridview control

查看:51
本文介绍了如何填充Gridview控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我需要在运行时填充数据网格视图

这样我需要帮助我


问候,
kpt

Hi ,

I need datagrid view fill at runtime

Like that i need pls help me


Regards,
kpt

推荐答案

GridView1.DataSource = dsData;//Assign data(from your database) to this Dataset dsData

GridView1.DataBind();


http://msdn.microsoft.com/en-us/library/fkx0cy6d.aspx [ http://www.asp.net/data-access/tutorials/using-templatefields-in-the-gridview-control-cs [ http://www.devmanuals.com/tutorials/ms/aspdotnet/databindgridviewprogrammatically.html [ ^ ]

http://www.java2s.com/Tutorial/ASP.NET/0380__Data-Binding/DataBindingtoGridViewC.htm [ ^ ]
http://msdn.microsoft.com/en-us/library/fkx0cy6d.aspx[^]

http://www.asp.net/data-access/tutorials/using-templatefields-in-the-gridview-control-cs[^]

http://www.devmanuals.com/tutorials/ms/aspdotnet/databindgridviewprogrammatically.html[^]

http://www.java2s.com/Tutorial/ASP.NET/0380__Data-Binding/DataBindingtoGridViewC.htm[^]


BindingSource bindingSource1 = new BindingSource();
GridView.DataSource = bindingSource1;


这篇关于如何填充Gridview控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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