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

[Solved] Select Row Color Problem

3 Answers 121 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 01 Jul 2009, 12:49 AM
Hello All,

We are using this awesome grid control but we have a problem by the moment:(

The height of a row is not the standard and one of its columns has a default bg color. This gives us an image of 80% select row color and 20% original column backgroung color when selectig it  :(

How can we solve it ?

<telerik:RadGrid ID="rgTemplate" runat="server" AutoGenerateColumns="False"   
GridLines="None" AllowPaging="True" AllowSorting="True"   
PageSize="22" CellPadding="0" AllowMultiRowSelection="True"   
OnNeedDataSource="rgTemplate_NeedDataSource" Skin="Vista" Width="100%">  
       <MasterTableView ShowFooter="True"                                   
       cellspacing="-1" 
       DataKeyNames="MailExternalTemplateId"   
       ClientDataKeyNames="MailExternalTemplateId">         
       <Columns>       
             <telerik:GridTemplateColumn ItemStyle-Width="1%">  
              <ItemTemplate> 
                <asp:ImageButton ID="imgTemplate" runat="server"          ImageUrl="~/Images/ico_16_2010_d.gif"  /> 
              </ItemTemplate> 
             </telerik:GridTemplateColumn>                      
             <telerik:GridBoundColumn  
                UniqueName="Name"   
                SortExpression="Name" HeaderText="Name" DataField="Name"  ItemStyle-BackColor="#EAF3FF"   
ItemStyle-Width="25%">  
             </telerik:GridBoundColumn>                          
             <telerik:GridTemplateColumn HeaderText="Description"  UniqueName="Description" SortExpression="Description" ItemStyle-Width="20%">  
                    <ItemTemplate> 
                       <asp:Label ID="lblDescription" runat="server" Text='<%#  Eval("Description")%>'></asp:Label> 
                       <asp:HiddenField ID="hdTemplateId" runat="server" Value='<%# Eval("MailExternalTemplateId")%>'  /> 
                     </ItemTemplate>                          
             </telerik:GridTemplateColumn> 
.. 

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 01 Jul 2009, 05:55 AM
Hi Alex,

Try including the below given CSS in the head section of your page and see whether it resolves the problem.

CSS:
 
<head runat="server">  
    <title>Untitled Page</title>  
    <style type="text/css" >  
     
     .RadGrid_Vista .rgSelectedRow 
     { 
       background:#abdbf5 0 -3900px repeat-x url('Grid/sprite.gif')!important;  
     } 
    </style>  
</head>  


Shinu
0
Alex
Top achievements
Rank 1
answered on 01 Jul 2009, 09:45 PM
<telerik:GridBoundColumn     
 UniqueName="Name"      
 SortExpression="Name" HeaderText="Name" DataField="Name"  ItemStyle- BackColor="#EAF3FF"      
ItemStyle-Width="25%">     
</telerik:GridBoundColumn>     
 
Thanks,

But including this style does not let me override bg color on the column specified when row is selected.  :(
0
Dimo
Telerik team
answered on 02 Jul 2009, 07:56 AM
Hi Alex,

Please review the following forum post and let us know if you have additional questions:

http://www.telerik.com/community/forums/community-forums/design/conditional-formatting-skews-all-the-skin-format-once-applied-to-a-row-in-radgrid.aspx#601248

Sincerely yours,
Dimo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Alex
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Alex
Top achievements
Rank 1
Dimo
Telerik team
Share this question
or