如何将Datagrid绑定到Datatable [英] How to bind Datagrid to Datatable

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

问题描述

我想通过分页绑定到所有记录的数据表来绑定Datagrid.

I want to Bind Datagrid with paging to a Datatable with all the records.

推荐答案

浏览这些
http://msdn.microsoft.com/en-us/library/aa479347.aspx [ ^ ]

使用带有排序和分页功能的DataTable的通用GridView [ ^ ]
Go through these
http://msdn.microsoft.com/en-us/library/aa479347.aspx[^]

Generic GridView Using DataTable with Sorting and Paging[^]


dim dt as new datatable
dt=ctype(Datagrid .datasource,datatable)


datagrid1.Datasource = dt;
datagrid1.Bind();


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

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