This is a migrated thread and some comments may be shown as answers.

Prevent Postback/Menu Closing

1 Answer 147 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Veteran
Richard asked on 23 Jan 2015, 04:28 PM
So here is what I have today.  A menu that the user allows to open, inside of this I want them to be able to be able to search for an item, display some simple information about what was searched for.  If they want to see the full record there will be a link to send them to that record.  My issue is when I use the searchbox, the moment I select something it causes the menu to close.  If I open up the menu again, everything is there.  Here is my code thus far:

<asp:UpdatePanel ID="up1" runat="server">
<ContentTemplate>

<telerik:RadMenu runat="server" ID="RadMenu1" Skin="Default" EnableShadows="true" BackColor="Green" ClickToOpen="true">
<Items>
<telerik:RadMenuItem PostBack="false" ImageUrl="/includes/images/menuSearch.png">
<ContentTemplate>
<div id="CatWrapper" class="Wrapper" style="width: 635px; height: 600px;">
<div style="width: 425px;">
SEARCH FOR ASSET
</div>

<telerik:RadSearchBox runat="server" ID="RadSearchBox1"
CssClass="searchBox" Skin="Silk"
Width="460" DropDownSettings-Height="300"
DataSourceID="sqlSearch"
DataTextField="description"
DataValueField="assetID"
DataKeyNames="asset_num,location,cost"
EmptyMessage="Search By Description"
Filter="StartsWith"
MaxResultCount="20"
OnSearch="RadSearchBox1_Search">
</telerik:RadSearchBox>

<div>
<asp:Label runat="server" ID="lblAsset" />
</div>
</div>

<asp:SqlDataSource ID="sqlSearch" runat="server" ConnectionString="<%$ ConnectionStrings:dbAll %>"
SelectCommand="SELECT * FROM assetMain"></asp:SqlDataSource>

</ContentTemplate>
</telerik:RadMenuItem>
</Items>
</telerik:RadMenu>

</ContentTemplate>
</asp:UpdatePanel>

1 Answer, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 26 Jan 2015, 03:32 PM
Hello,

If I understand correctly you want the RadMenu item, containing the RadSearchBox, to stay opened after you click on it. Please, find the OnClientItemClosing event documentation article, which shows how you can cancel the item's contraction.

If this is not the functionality you want to achieve, please explain your actions step-by-step (clicking on the RadMenu, searching in the RadSearchBox, etc.) and what you expect to happen at each step.

Regards,
Ivan Danchev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Menu
Asked by
Richard
Top achievements
Rank 1
Veteran
Answers by
Ivan Danchev
Telerik team
Share this question
or