RadGridView filtered data context

6 posts, 0 answers
  1. William
    William avatar
    2 posts
    Member since:
    Jan 2011

    Posted 24 Jan 2011 Link to this post

    Hi guys,

    I wanted to create a cool looking report that I can put in aa SharePoint site and I am blown away with what telerik can do.

    I like radgridview as it had an Excel-like look and feel and functionality, but now I wanted to create some charts and have it tie to the data in the grid, so if the data is filtered, the chart would also be refresh and updated accordingly.

    I was wondering if there's any easy way to do so, because the only way I could think of is complicated and messy (read all the filters that are applied and have the data source filtered out manually before doing chart1.itemsource=newlyfiltereddata; ). I was hoping there might be a more elegant way of doing so.

    Thanks,

    William
  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 24 Jan 2011 Link to this post

    Hi,

     You can bind both the grid and chart to a single QueryableCollectionView to achieve your goal. 

    Regards,
    Vlad
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  3. DevCraft banner
  4. William
    William avatar
    2 posts
    Member since:
    Jan 2011

    Posted 24 Jan 2011 Link to this post

    Hi Vlad,

    Thx for your prompt reply. As I have never used QueryableCollectionView before, would you happen to have any article and maybe sample code for this?

    So I assume if I bind this to the gridview, if it its is filtered, then it will filter the item as well automatically?

    Thanks,

    William
  5. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 24 Jan 2011 Link to this post

    Hi,

     Indeed if bound to QueryableCollectionView the grid will transfer sorting, filtering, grouping, etc. to this collection. You can check for example this demo to know more how to use QueryableCollectionView.

    Greetings,
    Vlad
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  6. Biruh MEKONNEN
    Biruh MEKONNEN avatar
    23 posts
    Member since:
    Apr 2010

    Posted 21 Feb 2011 Link to this post

    Hi,

    I want to do that however I have a datapager, and I need to get access to all the items to calculate some totals.
    How do I achieve that?
    Because the view gave me elements of the current page.
    So I'm moving to the next page each time I reach the end of a page, but is there a better way?

    Thanks.

  7. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 22 Feb 2011 Link to this post

    Hi Biruh MEKONNEN,

    To get access to all items you need the original source collection that you passed to the QueryableCollectionView constructor.

    The QueryableCollectionView is just a view over this original collection, as its name implies.

    All the best,
    Ross
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Back to Top
DevCraft banner