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

rgRow and rgAlt Row ItemTemplate alignment differs

1 Answer 134 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 1
Patrick asked on 07 Mar 2013, 12:08 PM
Hi,
I am having a problem with GridTemplateColumn aligning to the center on altRows and to the left on Rows. This is not what I want and I can't see any way to change it.
I am using Telerik.Web.UI.dll and skins.dll versions 2012.3.1016.40; 

aspx file:
<telerik:RadGrid Skin="Office2010Silver" CSSClass="GreenCustom">

.css file:
/* GreenCustom style for grid Office2010Silver = Happened */
.GreenCustom .rgRow a
{
    text-align: left;
    vertical-align: text-top;
    color: #F00;
}

.GreenCustom .rgAltRow a
{
    text-align: left;
    vertical-align: text-top;
    color: #FFF;
}

.GreenCustom .rgSelectedRow td
{
    text-align: left;
    vertical-align: text-top;
    background:  #FFF;
    border: solid 1px #e5e5e5;
    border-top: solid 1px #e9e9e9;
    border-bottom: solid 4px white;
    padding-left: 4px;
    color:#0F0;
}

.GreenCustom .rgHoveredRow td
{
    text-align: left;
    vertical-align: text-top;
    background:none;
    background-image:none;
    background-color:#CC2064;
    color:#0F0;
}

some of the GridTemplateColumn ItemTemplate columns have labels, some have hyperlinks,

The rows are aligned as I want to the top left and the alt rows are all aligned to the centre centre which I don't want.
Checking with view source the html I am finding:
<tr class="rgRow" valign="top" id="gridSearchResults_ctl00__2" style="text-align:left;">
<tr class="rgAltRow" id="gridSearchResults_ctl00__3">

I am wasting a lot of time on a product that I have never enjoyed using.
Any help gratefully received.

1 Answer, 1 is accepted

Sort by
0
Patrick
Top achievements
Rank 1
answered on 11 Mar 2013, 09:34 AM
I have now fixed this.
Using <ItemStyle> to set HorizontalAlign and VerticalAlign properties.
Still don't know what Skin or Style attribute was causing this. Using Telerik controls is like losing my eyesight and then being blindfolded and having my fingers broken and asked to play the violin from a distance.
Tags
Grid
Asked by
Patrick
Top achievements
Rank 1
Answers by
Patrick
Top achievements
Rank 1
Share this question
or