Resize Searchbox

3 posts, 0 answers
  1. Mickael
    Mickael avatar
    57 posts
    Member since:
    Oct 2014

    Posted 23 Mar Link to this post

    How can I resize the SearchBox from javascript ?

    I want to resize the SearchBox based on some available width between a min and max value I provide.

    I tried the following but nothing changed

    searchBox._dropDownWidth = "100px";
    searchBox._element.clientWidth = "100px";

  2. Veselin Tsvetanov
    Admin
    Veselin Tsvetanov avatar
    287 posts

    Posted 24 Mar Link to this post

    Hello Mickael,

    You could re-size the RadSearchBox on the client by manipulating the DOM elements using jQuery. Possible implementation could be:
    // Find the RadSearchBox DOM element as a jQuery object
    var searchBox = $telerik.$('#searchBox');
    var input = $telerik.$(searchBox.find('.rsbInput'));
    // Make the input wider
    input.css('width', '423px');
    // Make the whole RadSearchBox wider
    searchBox.css('width', '500px');

    Regards,
    Veselin Tsvetanov
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Mickael
    Mickael avatar
    57 posts
    Member since:
    Oct 2014

    Posted 24 Mar in reply to Veselin Tsvetanov Link to this post

    Works perfectly.

    Thank you very much :)

Back to Top