Can someone kindly tell me why this will not postback? All I want to do is have an asp button click event fired on click of the nodes that do not have any children. This works if I take the explorer bar out of the update panel. It also works if I pre-expand the nodes then click on an end node first. For some reason, after I click on a parent node I'm no longer able to postback to the server.
One other odd behavior is when I click on a parent node first then navigate to an end node, I can get a postback to happen if I double-click the node.... this is not normal.
<script type="text/javascript">
function webReportMenu_ItemClick_Client(sender, eventArgs) {
var item = eventArgs.getExplorerBarItem();
if (item.get_childrenCount() == 0) {
var btn = $get('<%= this.btnExplorerPost.ClientID %>');
btn.click();
}
</script>
<asp:UpdatePanel runat="server" UpdateMode="Always">
<ContentTemplate>
<asp:Button ID="btnExplorerPost" runat="server" OnClick="btnExplorerPost_Click" />
<ig:WebExplorerBar ID="webReportMenu" runat="server" DataSourceID="SampleDataSource" GroupExpandBehavior="SingleExpanded" >
<ClientEvents ItemClick="webReportMenu_ItemClick_Client" />
<DataBindings>
<ig:ExplorerBarItemBinding DataMember="ReportLevel" TextField="Name"/>
<ig:ExplorerBarItemBinding DataMember="ReportCategory" TextField="Name"/>
<ig:ExplorerBarItemBinding DataMember="ReportName" TextField="Name"/>
</DataBindings>
</ig:WebExplorerBar>
</ContentTemplate>
</asp:UpdatePanel>
<asp:XmlDataSource runat="server" DataFile="~/Sample.xml" ID="SampleDataSource" XPath="/Root/ReportLevel" />
Hi there,
I think you have to use the triggers functionality of update panel in order to do this:
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnExplorerPost" />
</Triggers>
Put the code above into the update panel.