带有ASPxGridView的UpdatePanel [英] UpdatePanel with ASPxGridView

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

问题描述

嗨!

我有一个Gridview,其中包含一个文本框列,人们可以在其中输入数量.

根据他们输入的数量,我会计算其花费的金额.这发生在我的文本框的TextChanged事件上.我遇到的问题是,我目前在文本框上将autopostback设置为true,并且出于明显的原因需要实现updatepanel.
当我使用updatepanel运行我的应用程序时,出现错误,提示找不到文本框.在哪里可以使用findcontrol方法并执行我的其余代码的正确位置?

HI!

I have a Gridview that contains a textbox column where people can enter quantities.

Depending on the quantities they enter I calculate the amount of money it costs. This happens on the TextChanged event of my textbox. The problem I have is that I currently have autopostback on true for the textbox and need to implement the updatepanel for obvious reasons.

When I run my app with the updatepanel I get the error that my textbox cannot be found. Where would be the correct place to use the findcontrol method and then execute the rest of my code?

Thanks!

推荐答案

您可以在客户端尝试javascript进行Gridview控件计算,因为服务器端代码比客户端要花更多的时间.编写用于计算的js&在控制事件中调用函数或在后面的代码中分配客户端事件.试试如何为gridview列添加客户端计算 [ ^ ]
You can try javascript for gridview control calculations by clientside because server side code will take more time than client side. Write the js for calculations & call the functions in control event or assign the client side event in code behind. Try this one How To Add client side calculation for gridview column[^]


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

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