赶上ASP.NET AjaxToolkit手风琴控制的SelectedIndexChanged事件 [英] catch SelectedIndexChanged event of Accordion control in ASP.NET AjaxToolkit
问题描述
我有一个动态填充的手风琴控制。我要赶在单击一个新的面板时打开引发该事件。我没有看到的事件都在智能影音感,当我code将其手工反正我得到的错误。
I have an Accordion control that is populated dynamically. I want to catch the event raised when a new pane is clicked on to open. I don't see the event at all in intelli-sense and when I code it by hand anyways I get errors.
有没有办法赶上这个活动?
Is there any way to catch this event?
我们的目标是让在持有的时候手风琴已更改,因此它可以更新其他控件的手风琴知道母版控制。
The goal is to let a control in the masterpage that is holding the Accordion know when the Accordion has changed so it can update another control.
推荐答案
要处理客户端的SelectedIndexChanged
事件:
function pageLoad()
{
$find("accordionBehaviorID").add_selectedIndexChanged(
accordion_selectedIndexChanged);
}
function accordion_selectedIndexChanged(sender, args)
{
var oldIndex = args.get_oldIndex();
var newIndex = args.get_selectedIndex();
// Do something...
}
像往常一样,你可以定义和使用href=\"http://helephant.com/2008/08/javascript-anonymous-functions/\" rel=\"nofollow\">匿名的:
function pageLoad()
{
$find("accordionBehaviorID").add_selectedIndexChanged(
function(sender, args) {
// Do something...
}
);
}
这篇关于赶上ASP.NET AjaxToolkit手风琴控制的SelectedIndexChanged事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!