Return footer text from web service

3 posts, 0 answers
  1. John
    John avatar
    15 posts
    Member since:
    Aug 2010

    Posted 11 May 2015 Link to this post

    I would like to fill in some custom footer information after search results are returned from a web service.  In the RadComboBox it was as easy as setting the RadcomboBoxData.Message property - how does one go about doing it for a SearchBox?  I would like to display either the number of items found + total search time, or a message saying "Please enter 3 characters to search".  

    One possible solution is to return only 1 item with the message to display, and a null value; then upon client items requesting has ended look through the results in javascript, remove it if it fits the critieria and set the footer - but I don't even see any client events for when the search results are received.

    Thank you in advance,

  2. Ivan Danchev
    Ivan Danchev avatar
    1302 posts

    Posted 14 May 2015 Link to this post

    Hello John,

    Since RadSearchBox does not have a collection of the returned entries and a client-side method to access them, if you want to get their count you will have to use custom logic. For instance, the following code gets (on key up in the input field) the count of the "rsbListItem" elements the entries are rendered as:
    $(document).ready(function () {
        $("#RadSearchBox1_Input").keyup(function () {
            setTimeout(function () {
                var returnedCount = $(".rsbListItem").length;
            }, 500);

    Ivan Danchev
    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
  3. John
    John avatar
    15 posts
    Member since:
    Aug 2010

    Posted 14 May 2015 in reply to Ivan Danchev Link to this post

    Thank you.  I see I would have to "guess" at the duration of the web service call....   At this time that's probably not the best fit.  I am going to stick with a RadDropdownBox...  Hopefully Telerik will enhance the search box UI experience to include things like this.

    Thank you for your assistance,

Back to Top