Completed
Last Updated: 28 Dec 2023 14:08 by ADMIN
Created by: Nick
Comments: 1
Category: SearchBox
Type: Feature Request
0

I want to be able to let a user choose "Landlords", "Tenants", "Owners" and search for a name. The data for the search box comes from different tables.

<asp:SqlDataSource ID="SqlDataSourceTenants" runat="server"

                           ConnectionString="<%$ ConnectionStrings:ProjectConnectionString %>"
                           SelectCommand="SELECT Id,TenantEntityName as EntityName FROM TenantEntities"></asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSourceLandlords" runat="server"
                           ConnectionString="<%$ ConnectionStrings:ProjectConnectionString %>"
                           SelectCommand="SELECT Id, LandlordEntityName as EntityName FROM LandlordEntities"></asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSourceOwners" runat="server"
                           ConnectionString="<%$ ConnectionStrings:ProjectConnectionString %>"
                           SelectCommand="SELECT Id,OwnerEntityName As EntityName FROM OwnerEntities"></asp:SqlDataSource> 

I would like to set the DatasourceId on the RadSearchBox to one of the above when the SearchContext changes. I have worked out how to get the selected searchcontext text via an Ajax Request.

     function OnClientLoad(sender, args) {
                    var context = sender.get_searchContext();
                    var $ = $telerik.$;
                    $(context).on({
                        "selectedIndexChanged": function (event) {
                            var searchbox = $find("<%=RadSearchBox1.ClientID%>");

                // this is the search context dropdown selectedIndexChanged event handler 
                            var ajaxManager = $find("<%=RadAjaxManager1.ClientID%>");
                            ajaxManager.ajaxRequest(context.get_selectedItem().get_text());
            }
        });
                }

 

I cannot work out how to change the datasource at runtime (I get datasource not found when I run the following code).

    Protected Sub RadAjaxManager1_OnAjaxRequest(sender As Object, e As AjaxRequestEventArgs)
        if not isnothing(radsearchbox1.datasource)
            select Case e.Argument
                Case "Tenants"
                    RadSearchBox1.DataSource = sqldatasourcetenants
                    RadSearchBox1.databind
                Case "Landlords"
                    RadSearchBox1.DataSource = sqldatasourcelandlords
                    RadSearchBox1.databind
                Case "Owners"
                    RadSearchBox1.DataSource = sqldatasourceowners
                    RadSearchBox1.databind
            End Select
        End If
    End Sub

In the OnSearch Event I just need to get the type of entity (which I could get from checking the Id of the bound datasource) and the Id of the entity:

Protected Sub RadSearchBox1_OnSearch(sender As Object, e As SearchBoxEventArgs)
        If e.DataItem IsNot Nothing Then
            Dim dataItem = DirectCast(e.DataItem, Dictionary(Of String, Object))
            Dim thisId As String = dataItem("Id").ToString()
            Dim thisEntityName As String = dataItem("EntityName").ToString()
            ' Lookup in database and redirect to the relevant data view / edit page
        End If
    End Sub

 

Surely this is a common request and deserves consideration?

 

Completed
Last Updated: 07 Dec 2022 13:09 by ADMIN
Release R1 2023
Unplanned
Last Updated: 20 Apr 2022 08:55 by Amit
Created by: Amit
Comments: 0
Category: SearchBox
Type: Feature Request
0
Implement the option that will display "No Results Found" in case no items are returned after the request.
Unplanned
Last Updated: 20 Apr 2022 08:52 by Amit
Created by: Amit
Comments: 0
Category: SearchBox
Type: Feature Request
0
Create an event that will be triggered after items have been requested.
Declined
Last Updated: 19 Apr 2022 17:36 by ADMIN
Created by: BiBongNet
Comments: 1
Category: SearchBox
Type: Feature Request
1
- Add Filter="None" (as discussed here: http://www.telerik.com/community/forums/aspnet-ajax/search-box/how-can-i-set-filter-to-none.aspx).
Declined
Last Updated: 02 Mar 2022 12:09 by ADMIN
ADMIN
Created by: Hristo Valyavicharski
Comments: 1
Category: SearchBox
Type: Feature Request
0
ADD: Property to SearchBox, which displays text if no records are returned.
Declined
Last Updated: 16 Jun 2021 08:12 by ADMIN
Hi, in SearchBox, when the field being searched is a date, we would like to be able to search via the 'smart parsing engine' of DateInput.
Won't Fix
Last Updated: 07 Jun 2021 13:57 by ADMIN
Completed
Last Updated: 27 May 2021 08:30 by ADMIN
Created by: SALVATORE
Comments: 1
Category: SearchBox
Type: Feature Request
0
Can I advice to extend SearchBox or RadAutoCompleteBox control to write free text and open list box only if I digit a custom char like '@'?
I am tinking a control like Post textbox in Facebook or in Twitter where I can digit text and, if I digit '@' char opens a list with all friends o mine.

If you want extend more, it will be wonderful if you can associate more than one custom char and each custom char is associated to a different Data source.
Example:
- '@' to get products
- '#' to get Customers
- and so on...

This SearchBox must can be multiline too.

Thanks,
Francesco.
Completed
Last Updated: 15 Feb 2021 11:43 by ADMIN
Created by: n/a
Comments: 2
Category: SearchBox
Type: Feature Request
0

Perhaps a simple feature to permit high speed searches in RadSearch is to allow custom SQL Select strings in lieu of direct connect to a SQL Datasource (unless there is a way to accomplish the following in a SQL Datasource)

I have FreeText and text optimization configured/added in SQL Server.  This provides a tremendous speed boost for searching strings.  Therefore, somehow in the RadSearch box allow searches such as:

SELECT * FROM myTable WHERE contains(myTextIndexedColumn,'this is fast') 

SELECT * FROM myTable WHERE FreeText(myTextIndexedColumn,'this is so much faster!') 

Unplanned
Last Updated: 03 Nov 2020 14:26 by ADMIN
Created by: Mike
Comments: 0
Category: SearchBox
Type: Feature Request
1
Please implement WAI-ARIA support in RadSearchBox with and without a Search Context.

It needs the same type of logic added as the AutoComplete and ComboBox control so that JAWS can speak and navigate the list items properly.
It looks like there was a little started because it renders an ARIA live region for status, but never writes to it from what I can tell.

I know this document lists the current controls that support ARIA - http://docs.telerik.com/devtools/aspnet-ajax/controls/wai-aria-support-and-screen-readers

Thanks,
Mike
Unplanned
Last Updated: 12 Mar 2019 05:39 by ADMIN
ADMIN
Created by: Plamen
Comments: 1
Category: SearchBox
Type: Feature Request
5

			
Unplanned
Last Updated: 15 Feb 2018 11:13 by ADMIN
ADMIN
Created by: Peter Milchev
Comments: 0
Category: SearchBox
Type: Feature Request
0
When the SearchBox is on the right side of the screen and the dropdown width is larger than the SearchBox width, the dropdown goes outside the viewport:
Actual: https://www.screencast.com/t/4SoNcRCj
Expected/fixed: https://www.screencast.com/t/smfPgy767M

Workaround: 

<script>
    function OnClientLoad(sender, args) {
        sender._dropDown.on({ "reflowed": sender._onReflowed }, sender)
    }

    Telerik.Web.UI.RadSearchBox.prototype._onReflowed = function () {
        var that = this;
                       
        var $animationContainer = $(that._dropDown._animationContainer);

        if (that._enableScreenBoundaryDetection) {
            var availableSpace = that._dropDown._getAvailableSpace();
            var tableWidth = $(that._innerWrapElement).outerWidth();
            var dropDownWidth = $animationContainer.outerWidth();
            var overflow = dropDownWidth - (tableWidth + availableSpace.right);

            if (overflow > 0) {
                var left = parseInt($animationContainer.css("left"), 10);
                var newLeft = Math.max(left - overflow, left - (dropDownWidth - tableWidth));

                $animationContainer.css("left", newLeft);
            }
        }
    }
</script>
<telerik:RadSearchBox runat="server" ID="RadSearchBox1"
    DataTextField="ShipName" OnClientLoad="OnClientLoad" DropDownSettings-Width="500px" DataValueField="OrderID">        
</telerik:RadSearchBox>
Unplanned
Last Updated: 07 Dec 2017 15:35 by ADMIN
ADMIN
Created by: Nencho
Comments: 0
Category: SearchBox
Type: Feature Request
0
Validation is not implemented for RadSearchBox.

You can find attached an example that emulates validation of a search box through a dummy textbox and validators attached to that dummy textbox.
Declined
Last Updated: 01 Aug 2016 14:16 by ADMIN
ADMIN
Created by: Boyan Dimitrov
Comments: 1
Category: SearchBox
Type: Feature Request
2

			
Declined
Last Updated: 29 Jul 2016 12:03 by ADMIN
ADMIN
Created by: Nencho
Comments: 1
Category: SearchBox
Type: Feature Request
1

			
Unplanned
Last Updated: 10 Sep 2015 12:57 by Andy
Created by: Andy
Comments: 0
Category: SearchBox
Type: Feature Request
2

			
Declined
Last Updated: 30 Jun 2015 10:54 by ADMIN
Created by: Andy
Comments: 1
Category: SearchBox
Type: Feature Request
2

			
Completed
Last Updated: 05 Nov 2014 10:37 by Elena
Declined
Last Updated: 14 Mar 2014 08:50 by ADMIN
Created by: Andy
Comments: 1
Category: SearchBox
Type: Feature Request
2