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

RadGrid Office2007 Style Table Design Custom Style Problem

1 Answer 99 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Hakan
Top achievements
Rank 1
Hakan asked on 13 Apr 2011, 02:56 PM
My problem realated with Office2007 Custom Style.I created my custom skin from default Office2007 css files.
And I changed Alternative row backcolor from html.But When I select row.Problem with background color.In
white rows there is no problem.How can I redesign css file.Please look image what is my problem
I have changed just

.RadGrid_MyCustomSkin

.rgRow td ,

 

.RadGrid_MyCustomSkin

 

 

.rgAltRow

td

 

{

border-color:#d0d7e5 ;

 

 

border-width:0px ;

 

 

padding: 0 !important

; }

 

<
telerik:RadGrid ID="grdGidis" Width="720px" Skin="MyCustomSkin" AlternatingItemStyle-BackColor="#F2F2F2"
                                        EnableEmbeddedSkins="false" Height="720px" runat="server" AutoGenerateColumns="False"
                                        OnItemCommand="grdGidis_ItemCommand">
                                        <MasterTableView TableLayout="Fixed" DataKeyNames="UcusID,D_UcusID">
                                            <NoRecordsTemplate>
                                                Sefer Bulunamadı...
                                            </NoRecordsTemplate>
                                            <Columns>
                                       
                                                <telerik:GridTemplateColumn ItemStyle-VerticalAlign="Middle" UniqueName="HavayoluLogo">
                                                    <HeaderTemplate>
                                                        Header...
                                                    </HeaderTemplate>
                                                    <ItemTemplate>
                                                        Items...
                                                    </ItemTemplate>
                                                </telerik:GridTemplateColumn>
                                                
                                            </Columns>
                                        </MasterTableView>
                                        <PagerStyle Mode="NumericPages"></PagerStyle>
                                        <ClientSettings EnableRowHoverStyle="true" AllowRowsDragDrop="false" Selecting-AllowRowSelect="true"
                                            AllowColumnsReorder="False">
                                            <Resizing AllowRowResize="False" EnableRealTimeResize="False" ResizeGridOnColumnResize="False"
                                                AllowColumnResize="False"></Resizing>
                                            <Selecting AllowRowSelect="false" />
                                            <Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true" />
                                        </ClientSettings>
                                    </telerik:RadGrid>

1 Answer, 1 is accepted

Sort by
0
Galin
Telerik team
answered on 18 Apr 2011, 10:05 PM
Hi Hakan,

I strongly recommend that you avoid setting the background and other styles with markup attributes, when it is possible to do it with CSS. This way is obsolete and will have negative effect on the performance.

Sample code:
div.RadGrid .rgAltRow
{
   background: #f2f2f2;
}

And also you will have to style the selected and hovered rows:
div.RadGrid .rgSelectedRow
{
   background: green;
}

div.RadGrid .rgHoveredRow
{
   background: red;
}

Please take a look at this blog post:
http://blogs.telerik.com/dimodimov/posts/08-06-17/how_to_override_styles_in_a_radcontrol_for_asp_net_ajax_embedded_skin.aspx

Regards,
Galin
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Grid
Asked by
Hakan
Top achievements
Rank 1
Answers by
Galin
Telerik team
Share this question
or