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

Nesting GridViews and Setting Styles

3 Answers 21 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Barry
Top achievements
Rank 1
Barry asked on 20 Aug 2012, 05:24 PM
I have a gridview nested like this:
<radtabcontrol>
    <radgridview style="styleA">
        <rowdetails> (from inside style A)
           
<radtabcontrol>
                <radgridview style="styleB"/>
            </radtabcontrol>
        </rowdetails>
    </radgridview>
</radtabcontrol>

Style A works fine and the columns are displayed from the style, but Style B does not. The data gets into the inner gridview, but no columns show up unless I set AutoGenerateColumns to true. I'm setting the first gridview to style A that includes a gridview inside of the style that I need to set to style B. Is there some weird thing that won't let you set the style of a gridview that is inside another style? The main gridview is in a page/view and both of the styles are in a resource dictionary.

3 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 22 Aug 2012, 11:51 AM
Hello,

 I have tested applying a simple style to a details GridView defined as you have suggested. The style was applied successfully. May I ask you how have you defined the style that does not apply?

Regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Barry
Top achievements
Rank 1
answered on 23 Aug 2012, 12:46 PM
I don't see how you could have possibly gotten this to work. I have found my solution though. I use control templates for the inside grid views and that seems to work fine. It almost seems that the grid views inside the row details are inheriting the style from the grid view that they are in... oh well, it works for me now.

<radtabcontrol>
    <radgridview style="styleA">
        <rowdetails> (from inside style A)
            <radtabcontrol>
                <radgridview Template="templateA"/>
            </radtabcontrol>
        </rowdetails>
    </radgridview>
</radtabcontrol>
0
Dimitrina
Telerik team
answered on 23 Aug 2012, 02:08 PM
Hi,

 I have attached the test project I used to check how the styles are applied.

Greetings,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
Barry
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Barry
Top achievements
Rank 1
Share this question
or