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

Search Context

1 Answer 61 Views
SearchBox
This is a migrated thread and some comments may be shown as answers.
Jason Bourdette
Top achievements
Rank 1
Jason Bourdette asked on 16 Oct 2015, 01:41 AM

How could i get the search context menu to render on the right hand side of the search box, verses the left side as it does by default.?

 Thanks

1 Answer, 1 is accepted

Sort by
0
Accepted
Ivan Danchev
Telerik team
answered on 20 Oct 2015, 12:31 PM
Hello,

You can move the SearchContext to the right of the search button with jQuery as shown below, however have in mind that such customization is not recommended and not supported and might lead to appearance issues as the control is not designed to render the SearchContext to the right hand side.
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    <Scripts>
        <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
        <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
        <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
    </Scripts>
</telerik:RadScriptManager>
<script type="text/javascript">
    function OnClientLoad(sender) {
        $(".rsbSearchContext").insertAfter(".rsbButtonSearch");
    }
</script>
<div>
    <telerik:RadSearchBox ID="RadSearchBox1" runat="server" Width="500" DropDownSettings-Height="200px"
        DataSourceID="SqlDataSource1"
        DataTextField="ProductName" DataValueField="ProductID" DataContextKeyField="SupplierID" OnClientLoad="OnClientLoad">
        <SearchContext DataSourceID="SqlDataSource2" DataTextField="ContactName" DataKeyField="SupplierID">
        </SearchContext>
    </telerik:RadSearchBox>
</div>

Regards,
Ivan Danchev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
SearchBox
Asked by
Jason Bourdette
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Share this question
or