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

Inheriting RadGridView to add RadDataFilter and RadDataPager in Custom Control

1 Answer 67 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Laura
Top achievements
Rank 1
Laura asked on 11 Jul 2011, 03:59 PM
Hi,

I'm deriving our custom grid from the RadGridView control and adding a couple of parts to the control template to include a RadDataFilter and a RadDataPager. I want to set up the sources such that when the ItemsSource property is set on the GridView, it actually sets the RadDataFilter Source property and then the RadDataPager Source would be the filter's FilteredSource, and finally the GridView ItemsSource should actually be the pager's PagedSource. How can I achieve this? Basically, when the consumer of this control sets the ItemsSource on the grid, I don't know how to intersect that and have the bindings as I describe here.

Thanks,
LauraH

1 Answer, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 11 Jul 2011, 04:16 PM
Hi Laura,

I am not really sure that what you are trying to do is actually possible. I really don't think that there is a way to intercept the setting of the ItemsSource of the grid and then cancel it and then do all of these things that you describe. But I might be wrong. Maybe the WPF gurus at the WPF forums or StackOverflow will think of something.

The thing is, a question such as this one is not really concerning Telerik controls, but is more of a general .NET how-to question. In other words, if you were using the stock DataGrid instead of RadGridView, how would you achieve exactly the same thing? Or as a matter of fact, you can replace the names of the three controls and their properties with anything else that you might think of, and the question would still be the same.

I hope this makes sense.

Kind regards,

Ross
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
GridView
Asked by
Laura
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Share this question
or