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

Different theme for grid detail view?

9 Answers 160 Views
Themes and Visual Style Builder
This is a migrated thread and some comments may be shown as answers.
Karen Mattox
Top achievements
Rank 1
Karen Mattox asked on 29 Apr 2009, 07:13 PM
Is it possible to set up a different theme for only the detail portion of the hierarchical grid? There does not appear to be any way in the existing gridview theme to specify cell colors and borders, row properties, etc. for the contents of the detail portion of the grid. When I change them in the existing grid theme, they do not apply to the child portion, even when I change them in the Visual Style Builder's RadGridView GridDetailViewRowElement or it's subelements. (Other changes I made in the theme do apply, so I am certain the theme is found properly). Ideally I would like the child rows to be styled differently from the parent rows, and so far the only way I seem to be able to affect them is through the CellFormatting event, but that is painful. Thank you for your time.

9 Answers, 1 is accepted

Sort by
0
Accepted
Jack
Telerik team
answered on 30 Apr 2009, 11:30 AM
Hi Karen,

Thank you for this suggestion.

Yes, currently it is possible to change cell appearance for child views only via code by handling the CellFormatting event. However, extending our Visual Style Builder to support this feature is a good idea and I added the request in our TODO list. We will consider implementing it in one of our future versions.

If you have any other questions, don't hesitate to contact us.

Regards,
Jack
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Karen Mattox
Top achievements
Rank 1
answered on 30 Apr 2009, 12:59 PM
OK. Is there currently any way though to align the child grid rows to the right? In other words, if there is available (blank) real estate in the grid for the child row, I want it to appear on the left and the columns to be on the right side of the grid. I am NOT referring to text alignment. Thank you,
Karen
0
Accepted
Jack
Telerik team
answered on 30 Apr 2009, 02:41 PM
Hi Karen,

It isn't possible to change the layout to be right to left only for the child views. However, similar effect can be achieved by setting the Padding property of the GridDetailViewCellElement. Please consider the code below:

void radGridView1_ViewCellFormatting(object sender, CellFormattingEventArgs e) 
    if (e.CellElement is GridDetailViewCellElement) 
    { 
        e.CellElement.Padding = new Padding(100, 10, 10, 10); 
    } 

I hope this helps. Should you have additional questions, I will be glad to answer them.

Regards,
Jack
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Karen Mattox
Top achievements
Rank 1
answered on 30 Apr 2009, 02:54 PM
Thank you, that works for now. Once the VisualStyleBuilder has themes for the child, there is an Align on one of the elements that might work.
0
Jack
Telerik team
answered on 30 Apr 2009, 04:16 PM
I am glad to hear that this solution is satisfactory for you. If you need further assistance, don't hesitate to contact us.

All the best,
Jack
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
MikeK
Top achievements
Rank 1
answered on 12 Apr 2011, 05:30 PM
This thread is a couple of years old now. Has this option been added to VSB in a current release?

I'm using Q3 2010 and submitted a support ticket, but the answer didn't meet my needs. I used your custom theme from the Help Desk Demo, but my child grid isn't using the black style - it's the office blue style. This looks stupid, so I tried to style it. I set absolutely every setting I found under VSB and couldn't change it.

I attached a screen dump of my app showing my issue.
0
Jack
Telerik team
answered on 15 Apr 2011, 09:25 AM
Hello MikeK,

Thank you for contacting us. You should change the theme registration in order to solve this issue. However, we should check the theme to be sure. Please, open a support ticket and send me your theme. I will do all modifications for you.

I recommend that you try our latest release Q1 2011. It contains many improvements and addresses a lot of issues.

I am looking forward to your reply.
 
Kind regards,
Jack
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
MikeK
Top achievements
Rank 1
answered on 15 Apr 2011, 01:49 PM
I got this resolved through a support ticket this week. For other people following this thread, here are the details for resolution.

The Q3 2010 Winforms suite doesn't expose a property needed to allow the grid to cascade the custom style to the child grid. You also can't make any changes via the style builder to make this happen. What is needed is to save your custom style as the collection of XML files, then locate the Telerik_WinControls_UI_RadGridView.xml file. Editing it manually, the following line has to be added. The style can be recompiled and saved as a tssp file again.

<RadStylesheetRelationControlType="Telerik.WinControls.UI.RadGridView"ElementType="Telerik.WinControls.UI.GridTableElement"/>
 

0
Jack
Telerik team
answered on 15 Apr 2011, 04:13 PM
Hi MikeK, thank you for sharing your solution with the community. Do not hesitate to contact us If you have any other questions.
 
Greetings,
Jack
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Themes and Visual Style Builder
Asked by
Karen Mattox
Top achievements
Rank 1
Answers by
Jack
Telerik team
Karen Mattox
Top achievements
Rank 1
MikeK
Top achievements
Rank 1
Share this question
or