Prevent Postback/Menu Closing

2 posts, 0 answers
  1. Richard
    Richard avatar
    18 posts
    Member since:
    Sep 2011

    Posted 23 Jan 2015 Link to this post

    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>
  2. Ivan Danchev
    Admin
    Ivan Danchev avatar
    829 posts

    Posted 26 Jan 2015 Link to this post

    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.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top