您如何通过Telerik的RadlistBox OnClientsElectexexchanged事件传递参数?
-
04-10-2019 - |
题
您如何通过Telerik的RadlistBox OnClientsElectexexchanged事件传递参数?看来您使用此事件调用的方法是
<script type="text/javascript">
someMethod(sender, eventArgs)
{
var ajaxManager = $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>");
if (ajaxManager != null)
ajaxManager.ajaxRequest("ListBoxIndexChanged"); //I would like my custom argument here
}
</script>
从控制中,我称其为
<telerik:RadListBox ID="radListBox0" runat="server"
OnClientSelectedIndexChanged="someMethod" />
如果我尝试将带有不同签名的物种途径,则页面不起作用...
解决方案
无法更改OnClientsElectedIndexchanged方法的签名 - 它以第一个参数接收ListBox Client对象,并且针对事件事件的特定于第二个参数。如果将全局JS变量或其他自定义存储用于参数,则应能够在客户端处理程序中获取其值。
不隶属于 StackOverflow