This is a migrated thread and some comments may be shown as answers.

RadGridView filtered data context

5 Answers 162 Views
GridView
This is a migrated thread and some comments may be shown as answers.
William
Top achievements
Rank 1
William asked on 24 Jan 2011, 11:53 AM
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

5 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 24 Jan 2011, 12:46 PM
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>>
0
William
Top achievements
Rank 1
answered on 24 Jan 2011, 01:33 PM
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
0
Vlad
Telerik team
answered on 24 Jan 2011, 01:37 PM
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>>
0
Biruh MEKONNEN
Top achievements
Rank 1
answered on 21 Feb 2011, 12:11 PM
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.

0
Rossen Hristov
Telerik team
answered on 22 Feb 2011, 12:26 PM
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!
Tags
GridView
Asked by
William
Top achievements
Rank 1
Answers by
Vlad
Telerik team
William
Top achievements
Rank 1
Biruh MEKONNEN
Top achievements
Rank 1
Rossen Hristov
Telerik team
Share this question
or