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

GridView rows spacing and alternating color

3 Answers 296 Views
GridView
This is a migrated thread and some comments may be shown as answers.
antoniodlp
Top achievements
Rank 2
antoniodlp asked on 22 Jul 2010, 07:28 PM
Hi,

There seems to be some space between each grid view row that I can't remove, I've tried with the row and cell templates and datacellspresenter and pretty much everywhere else. Where should I look for it?

found the answer: It was the outer border of the hover state I had set it to transparent and seemed like the row had an extra margin...

Also I can't get rows to show with alternating colors. (this is still open)

new question: now I can't seem to be able to set the default row height or override it in the theme, where can I do it?

I took the Windows7 theme as a starting point. Maybe you can recommend a simpler one?

Thank you very much.

3 Answers, 1 is accepted

Sort by
0
Kalin Milanov
Telerik team
answered on 23 Jul 2010, 01:44 PM
Hello raindogmx,

For alternation you will need to set the AlternationCount property to show the default alternate background. If you want to change it you will need to also set the AlternationBackground propery. 

As for the height of the rows - set the RowHeight property to achieve the desired result.

All the best,
Kalin Milanov
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
antoniodlp
Top achievements
Rank 2
answered on 23 Jul 2010, 09:06 PM
Hi Kalin,

The AlternationCount worked like a charm, though I'd like to set it by default on every grid. Is that possible?

Now about the height, and also font size, of the cells/rows I tried setting RowHeight and didn't work, possibly because I tweaked something which I shouldn't have in the theme. Do you know in which file has those settings? Is it gridViewCell.xaml, gridViewRow.xaml? I can't quite figure it out.

Thank you!
0
Vanya Pavlova
Telerik team
answered on 27 Jul 2010, 04:48 PM
Hi raindogmx,

I have created a sample for you that could be useful for you-there you can see how to manipulate different properties in both styles GridViewRowStyle/AlternatingRowStyle.
Please fell free if you need any additional information.
Greetings,
Vanya Pavlova
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
GridView
Asked by
antoniodlp
Top achievements
Rank 2
Answers by
Kalin Milanov
Telerik team
antoniodlp
Top achievements
Rank 2
Vanya Pavlova
Telerik team
Share this question
or