Ajax和DataGrid [英] ajax and datagrid

查看:191
本文介绍了Ajax和DataGrid的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的项目中使用ajax控件.
在该ajax标签控件中,我放置了一个datagrid控件.
设置了网格的属性


即allowpagging = true;
pagesize = 3;

当我点击下一步时,它将显示错误.


GridView的"GridView1"触发了未处理的事件PageIndexChanging.

谁能帮我把我只是ajax的初学者.

i am using ajax controls in my project.
in that ajax tab control i had put one datagrid control.
had set the properties of grid


i.e. allowpagging=true;
pagesize=3;

when i clik in on next no it will show error.

i.e.
The GridView ''GridView1'' fired event PageIndexChanging which wasn''t handled.

can anyone help me put i am just a begginer in ajax.

thankx in advance.

推荐答案

您必须在网格控件上管理PageIndexChanging方法

you have to manage PageIndexChanging method on your grid control

protected void Gridview1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
    Gridview1.PageIndex = e.NewPageIndex;
    BindGrid();
}



所以将这段代码放在您的页面上,您就可以继续

巴万克(Bhavank)



so put this code on your page and you can go ahead

Bhavank


这篇关于Ajax和DataGrid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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