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

Wrapping a GridView

1 Answer 54 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Terry Newton
Top achievements
Rank 1
Terry Newton asked on 04 May 2012, 06:47 PM
How do I expose properties of the RadGridView?

I want to add features to a reusable version of the gridview that can be used in many places in my app in various ways, but allways exposing the additional features to provide a consistent look and feel.  I wrapped a user control around a working version of the grid and went to replace the grid in the app with the wrapped grid.

The challenge at this time is I want to set the properties of the inner grid from xaml similarily to what I did when the gridview was directly embeddedm but I need to do so via the outer user control which is all the page knows about now.  

Do I need to create a dependency property to allow the Xaml to access the properties of the Inner Grid via the wrappers grid property?

I want to turn:
SelectionMode="Extended"
into something like:
InnerGrid.SelectionMode="Extended"
but I get that the attachable property is not found, and research on that seems to indicate I need to set up the RadGrid as an attachable property, which leads me to dependency properties, but I want to be sure I am headed in the right direction.



1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 07 May 2012, 07:11 AM
Hi,

 Indeed the correct way will be to create desired properties for the user control and bind RadGridView properties to the user control  properties. 

Regards,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
GridView
Asked by
Terry Newton
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or