Emulate Google Images search results pagination w/ ListView and RadDataPager

2 posts, 0 answers
  1. Esteban
    Esteban avatar
    3 posts
    Member since:
    Apr 2012

    Posted 03 May 2012 Link to this post


    I am currently working on a Media Library module for a CMS. Reading a folder in the file system I bind the results to a RadListView that has a PageSize of n (12 at the moment) in order to display its content: images.

    DirectoryInfo di = new DirectoryInfo(MediaLibPath);
    FileSystemInfo[] files = di.GetFiles();
    var fileByUploadedDate = files.OrderByDescending(f => f.CreationTime);
    ResourceLV.DataSource = files;

    In the RadDataPager I have a RadButton with the OnClick

    ResourceLV.PageSize += 12;

    ReloadResourceListView() rebinds the ListView. Very similar to this sample:


    What I am trying to avoid is rebind every time as there could be hundreds of images in the folder being
    read. Is it possible to have the PageSize increase sort of like google images search results.
    What would your suggestion be? What about the PageSize from Grid, could that be emulated too?


  2. Tsvetina
    Tsvetina avatar
    1863 posts

    Posted 07 May 2012 Link to this post

    Hello Esteban,

    The only way to append items to RadListView without rebinding the whole control is to use it with client-side binding which allows appending data to an already bound listview. You can see a sample implementation here:

    All the best,
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. Telerik UI for ASP.NET Core is out
Back to Top