ASPxNavigationBar – JavaScript when NavBarItem clicked

following code example explains how to execute a java script function when any an items in a ASPXNavbar is clicked.

<dx:ASPxNavBar ID="nbMenuSPISLeedOwners" runat="server" Width="100%" AllowSelectItem="True"
DataSourceID="SiteMapDataSource1" OnItemDataBound="ASPxNavBar1_ItemDataBound">
<ItemStyle HorizontalAlign="Left" />
<GroupHeaderStyle HorizontalAlign="Center">
</GroupHeaderStyle>
<ClientSideEvents ItemClick="OnItemClick" />
</dx:ASPxNavBar>

<dx:ASPxLoadingPanel ID="loadingPanel" runat="server" Text="Redirecting&amp;hellip; Please wait!"
ClientInstanceName="loadingPanel" BackColor="Pink" >
</dx:ASPxLoadingPanel>

The Javascript should be as follows:

function OnItemClick(s, e) {
 loadingPanel.Show();
 }

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: