从JQuery调用GridView RowDataBound事件 [英] Call GridView RowDataBound event from JQuery

查看:109
本文介绍了从JQuery调用GridView RowDataBound事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我正在使用c#开发Asp Web应用程序,其中有Gridview,在gridview中有Asp链接按钮.

在单击linkbutton时,我正在调用jquery模型popUp,它在模型popup中具有确定的取消按钮.单击弹出的Jquery模型的确定"按钮后,我想调用GridView RowDataBound事件.


我在Ok按钮(内部jquery函数)中编写回发代码,如下所示:

__doPostBack(''ctl00_ContentPlaceHolder1_grdOrder_ctl02_btnSpIns'',``'')

单击并返回页面,但不调用GridView RowDataBound.
我该怎么称呼该事件.因为网格仅在该事件上绑定.


谁能帮我...
在此先感谢您.

Hello,

I am Developing Asp web application using c#, in which I am having Gridview and inside gridview there is Asp linkbutton.

On click of linkbutton i am calling jquery model popUp which is having ok cancel button inside model popup . I want to call GridView RowDataBound event after clicking OK button of Jquery model pop up.


I write the code of postback on Ok button(inside jquery function) which is as follows:

__doPostBack(''ctl00_ContentPlaceHolder1_grdOrder_ctl02_btnSpIns'', '''')

click and page is post back but not calling the GridView RowDataBound.
How can i call that event..Because grid bind on only that event.


can any one help me please...
Thanks in Advance.

推荐答案

请在您的按钮单击事件内调用RowDataBound事件.

Please call RowDataBound event inside your button click event.

protected void btnSpIns_Click(object sender, EventArgs e)
{
      dtgView_RowDataBound(dtgView,new GridViewRowEventArgs(dtgView.Rows[1]));
}



此处为"dtgView" GridView控件
还传递RowDataBound事件参数GridView Control和您的绑定行"索引.



here "dtgView" GridView Control
also pass RowDataBound event parameter GridView Control and your Binding Row index.


这篇关于从JQuery调用GridView RowDataBound事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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