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

Style for GridViewHeaderCell in theme is partially ignored

2 Answers 101 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Chris Smith
Top achievements
Rank 1
Chris Smith asked on 15 Sep 2008, 08:29 AM
Dear All

We are using a theme to restyle the GridView.  We had it looking great in our app before we incorporated the service pack, but now certain things have changed and it looks as if parts of the style for GridViewHeaderCell objects in the header are not being honoured.

In particular, we have this in the ControlTemplate:

<

ContentPresenter Margin="7,4"

HorizontalAlignment="Left"

.../>

-------------
When we use Snoop to look at the resulting visual tree, neither the margin nor the alignment are set to these values.  They are "0" and "Center" respectively and their source is given as "ParentTemplate".  I had to resort to setting a margin on GridViewHeaderCell to get the previous appearance and I can't find a way of getting Left alignment on the header text.

Is the GridView setting these programmatically?  If we had the source for the service pack, we could track this down ourselves.

Thanks for your help

Chris

2 Answers, 1 is accepted

Sort by
0
Chris Smith
Top achievements
Rank 1
answered on 15 Sep 2008, 10:59 AM
I've just figured out where this comes from.

Our style to target GridViewHeaderCell had a trigger in it that chose one of two styles depending on whether the Placement property of GridViewHeaderCell was "HeaderRow" or "GridViewGroupPanel".

It looks as if the Placement property has disappeared from GridViewHeaderCell in the service pack.  Since we don't use the group panel, this is not a problem and we are now just applying our style to all instances of GridViewHeaderCell.

Cheers

Chris
0
Pavel Pavlov
Telerik team
answered on 16 Sep 2008, 06:55 AM
Hello Chris,

We removed the placement property. We found it obsolete as we now have different UI elements to represent the cell in the header and the cell in the group panel.

Please  excuse us for the caused inconvenience.

I am glad that everything is now ok  with the template.

Please let us know if you have any other troubles with the grid.

Sincerely yours,
Pavel Pavlov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
GridView
Asked by
Chris Smith
Top achievements
Rank 1
Answers by
Chris Smith
Top achievements
Rank 1
Pavel Pavlov
Telerik team
Share this question
or