add a search bar

5 posts, 0 answers
  1. Ignacio Ortuzar
    Ignacio Ortuzar avatar
    14 posts
    Member since:
    Aug 2009

    Posted 10 Nov 2009 Link to this post

    Hi there!!..

    I want to know if exist any way to add a search input and show de results in the file explorer?

    The idea is that I can manage the results files in the same way that I can manage the files inside the folders.

    Thanks!
  2. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 16 Nov 2009 Link to this post

    Hi,

    In your scenario you could use this approach:
    • attach a handler to the ExplorerPopulated event:
      protected void Page_Load(object sender, EventArgs e)
      {
          RadFileExplorer1.ExplorerPopulated += new RadFileExplorerGridEventHandler(RadFileExplorer1_ExplorerPopulated);
      }
    • Implement the handler as follows:
      void RadFileExplorer1_ExplorerPopulated(object sender, RadFileExplorerPopulatedEventArgs e)
      {
          // Filter the items by value set to the textbox;
          e.List = e.List.Where(fbi => fbi.Name.Contains(TextBox1.Text)).ToList();
      }

    For your convenience I have attached a demo project to this thread. I hope it helps.

    All the best,
    Fiko
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Terrier Maxandre
    Terrier Maxandre avatar
    3 posts
    Member since:
    Mar 2010

    Posted 08 Jul 2010 Link to this post

    HI I would like to use this code in VB , I tried the converter but the result is wrong.

    Cordially
  5. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 13 Jul 2010 Link to this post

    Hi Cordially,

    For your convenience I have prepared a VB version of the provided example.

    I hope this helps.

    Greetings,
    Fiko
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  6. Terrier Maxandre
    Terrier Maxandre avatar
    3 posts
    Member since:
    Mar 2010

    Posted 15 Jul 2010 Link to this post

    Thanx a lot for your reply the code works perfectly!
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017