gidviewbind使用webmethod [英] gidviewbind using webmethod
问题描述
大家好,
我正在使用modelpopupextender.这将在使用javascript的按键事件(按F2键)上显示.这个模型弹出窗口,针对面板,有一个网格视图,我在窗体视图数据绑定事件期间绑定数据.但是问题是我需要在按下F2键时重新绑定网格视图,直到不改变窗体视图模式为止.这种重新绑定将由bcoz完成,当在母版中输入新记录时,由于未发生回发,因此该记录未在gridview中显示.所以我想通过网络方法尝试.但是在静态的web方法中,它找不到gridview控件.因此,任何人都可以建议或发送相关代码来解决该问题.希望您能理解这个问题.
Hi every one,
I am using modelpopupextender. This will be shown on keypress event (F2 press) using javascript. This modelpopup,targeted to panel,having a gridview where I bind data during the form view databound event.But the problem is i need to rebind the gridview when F2 is pressed,untill formview mode is not changed.This rebind is to be done bcoz, when a new record is entered in masters,it is not been shown in the gridview as post back is not happening. So i want to try it by web method. But in static webmethod,it is unable to find the gridview control. So,can anyone suggest,or send the related code to solve the problem. I hope you understood the problem.
[WebMethod(EnableSession = true)]
public static int fun()
{
//here i am unable to find the control
}
这是正确的方法吗?
谢谢
is this the right method to do?
Thanks
推荐答案
>
按下F2时
您必须使用JavaScript,对吧?
You must be using JavaScript, right?
所以我想通过网络方法尝试
So i want to try it by web method
为什么要使用Webmethod?为什么不回叫?
看看本文 [
Why Webmethod? Why not Callback?
Have a look at this article[^], it would be easy to use Callback and update the grid.
这篇关于gidviewbind使用webmethod的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!