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

[Solved] Theming / Skinning

8 Answers 241 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.
Hannes
Top achievements
Rank 2
Hannes asked on 08 Jan 2009, 02:10 PM
I know that theming isn't there until the final release of this gridview, so I'm looking forward to this release.

But in the meanwhile, my grids are looking well out of line from the rest of my controls. And with an upcoming project presentation coming up, I'd like to hack around and do something about it: is there a way to (temporarily) skin the GridView ourselves for now now?

I was thinking along the lines of adjusting the ControlTemplates of the standard theme. Is there somebody who has a code example of how to go about this?

8 Answers, 1 is accepted

Sort by
0
Nedyalko Nikolov
Telerik team
answered on 09 Jan 2009, 12:52 PM
Hi Hannes,

Can you provide me with more information about what you want to customize?
There is a way to apply different styles for all cells in the RadGridView. For reference you can see this thread from our public forum.

Regards,
Nedyalko Nikolov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Hannes
Top achievements
Rank 2
answered on 09 Jan 2009, 01:53 PM
I'd like to:

- Style the column headers
- Style the cells (I looked at the other post and I'm going to try it right now)
- Remove the Row headers for aestetic reasons

So any help that will get me closer is more than welcome
0
Hannes
Top achievements
Rank 2
answered on 10 Jan 2009, 09:40 AM
I managed to make a control template for the Cells, but the XAML code of the original would greatly help. Unfortunately, it is not included in the Silverlight RadControls source code package. Is it possible to grab it somewhere?
0
Hannes
Top achievements
Rank 2
answered on 11 Jan 2009, 12:10 PM
OK, I've managed to retrieve most of the templates using Reflector. And I also managed to apply most of them.

Except for the rowtemplate, someting seems wrong with that. I tried to set it using the Rowappearance styles and the by setting the Template property. But every change I made to the ControlTemplate did nothing at all. 
0
Hristo Deshev
Telerik team
answered on 12 Jan 2009, 05:00 PM
Hi Hannes,

I think I already answered some of your question in the "First Impression" forum thread, but here is an example that would customize your column's header cell style (and template):

<Grid x:Name="LayoutRoot" Background="White"
    <Grid.Resources> 
        <Style x:Key="headerStyle" TargetType="GridView:GridViewHeaderCell"
            <Setter Property="Template"
                <Setter.Value> 
                    <ControlTemplate TargetType="GridView:GridViewHeaderCell"
                        <Border HorizontalAlignment="Stretch"  
                                VerticalAlignment="Stretch"  
                                Background="HotPink"
                            <ContentPresenter /> 
                        </Border> 
                    </ControlTemplate> 
                </Setter.Value> 
            </Setter> 
        </Style> 
    </Grid.Resources> 
 
    <telerikGrid:RadGridView Name="RadGridView1" ShowColumnHeaders="True" ShowGroupPanel="False"
        <telerikGrid:RadGridView.Columns> 
            <GridView:GridViewDataColumn  
                HeaderText="CustomColumn" 
                DataMemberBinding="{Binding Subject}" 
                HeaderCellStyle="{StaticResource headerStyle}"></GridView:GridViewDataColumn> 
        </telerikGrid:RadGridView.Columns> 
    </telerikGrid:RadGridView> 
</Grid> 

Unfortunately the RowTemplate route in the RowAppearanceSettings class is a dead end with regards to customization. That feature has not been ported from WPF yet. Sorry!

Greetings,
Hristo Deshev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Hannes
Top achievements
Rank 2
answered on 13 Jan 2009, 08:13 AM
Thanks for the reply, I already did something along those lines and it's working fine.

I'm sorry to hear that the RowTemplate features are not working yet, but at least I know now that it's not my fault it's not working.

The only thing I'm bothered with is that I have to make a presentation for potential customers next saturday (january 24) and I just wanted it to look good. But the last element messing up the style of this grid is the row headers. They can neither be removed nor changed in color.

Is there a CVS branch or something I can check out to get the source code, because then I can build a version that suits my needs and I won't have to bother you any further with this.
0
Hristo Deshev
Telerik team
answered on 15 Jan 2009, 11:28 AM
Hi Hannes,

By "row headers" do you mean the leftmost column? We are working on a way to properly hide it, and I might be able to send you an unofficial build that has the feature implemented.

We do provide our source code to customers, but we do not have the practice of pushing source drops for beta and "Futures" product to the Client.NET www.telerik.com area. Since you are a customer, you can open a separate support ticket, and I can arrange that you get a drop that can get you going.

Greetings,
Hristo Deshev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Hannes
Top achievements
Rank 2
answered on 21 Jan 2009, 02:17 PM
Yes, that's exactly the column I need to hide.

I'll open a ticket right away.
Tags
GridView
Asked by
Hannes
Top achievements
Rank 2
Answers by
Nedyalko Nikolov
Telerik team
Hannes
Top achievements
Rank 2
Hristo Deshev
Telerik team
Share this question
or