C Sharp .Net Datagridview分页 [英] C sharp .Net datagridview paging

查看:60
本文介绍了C Sharp .Net Datagridview分页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为C#.net的datagridview控件中的第一个,下一个,上一个,最后一个按钮编写用于分页的单个通用函数.任何人都可以帮助我.please

I want to write a single common function for paging with first,next,previous,last buttons in datagridview control in C#.net.Any one can help me .please

推荐答案

您本可以尝试使用Google:它很快就找到了我. 在VirtualMode中使用DataGridView对数据进行分页 [
You could have tried Google: it found me this very quickly. Paging Data with DataGridView in VirtualMode[^]


public partial class Sample : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        PagingTableAdapter pAdapter = new PagingTableAdapter();
        DataGridView1.DataSource = pAdapter.FetchRecords(10,5);
        DataGridView1.DataBind();
    }
}


签出:

DataGrid分页-C#Windows窗体 [
check this out:

DataGrid Paging - C# Windows Forms[^]

hope it helps :)


这篇关于C Sharp .Net Datagridview分页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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