In my application I have page where I have extended the RadGridView. On the actual grid I have extended the default behaviour in the code behind with things like implmenting a filter by clicking any value. In addtion to this I used a RadToolBar to create a toolbar with common functionality such as print, output to XL, remove all filters and the ability to run some predefined complex filters. For example press button A and get all rows in the UK with outstanding costs > £1000. This is working very well.
What I would like to do is now package this up so I can reuse the common functionality on other pages. To do this I have created a user control. The basic composition of the user control is like this (obviously there is a lot more XAML!)
It would appear from the examples that I have seen so far that in order to expose the properties / objects of the toolbar and the gridview I have to create a DP and set the value in code. This is going to be a lot of work as the hosting page will be defining the gridview columns and the filters to set.
Is it possible for the page on which the user control is placed (host page) to get access to the toolbar and gridview object in XAML? I have created a public variable in the user control that reprsents the grid view but the hosting page does not allow me to reference any of the properties. I am sure I am missign something basic!
As an example how can the host page of the user control above access the RadGridView column collection? Another way to ask the same question is can I make a reference to the RadGridView in the code behind of theuser control that can be seen by the hosting page and recognised as a grid view?