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

Grid with selected rows NOT highlighted

9 Answers 1175 Views
Grid
This is a migrated thread and some comments may be shown as answers.
skysailor
Top achievements
Rank 1
skysailor asked on 06 Aug 2009, 05:31 AM
Hi,
I would like to use row selection but don't want the row to be highlighted in any way - just use the GridClientSelectColumn checkbox to show the selection. How can I turn the highlighting off?
Clayton

9 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 06 Aug 2009, 02:04 PM
Hello,

Try the following approach by applying style for selected item and see whether helps.

ASPX:
 
<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1" GridLines="None" > 
    <SelectedItemStyle CssClass="selectedrow" /> 
    <MasterTableView AutoGenerateColumns="False" DataSourceID="SqlDataSource1"
        <Columns> 
          . . . 
        </Columns> 
    </MasterTableView>    
</telerik:RadGrid> 

CSS:
 
<style type="text/css"
.selectedrow  
{  
    background-color:none !important; 
    background: None !important;  
</style> 

-Shinu.
0
skysailor
Top achievements
Rank 1
answered on 06 Aug 2009, 11:55 PM
Hi,
Thankyou for your suggestion. I have tried this and it does stop the bright green highlight that was there. But it still does highlight the row with a dark grey background. How can I completely remove the highlighting? I would have expected a switch to just turn it off.
Clayton
0
Mira
Telerik team
answered on 12 Aug 2009, 07:57 AM
Hi skysailor,

I have tried
ASPX:
            <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1" GridLines="None" Skin="Vista"
                <ClientSettings EnableRowHoverStyle="false"
                    <Selecting AllowRowSelect="true" /> 
                </ClientSettings> 
                <SelectedItemStyle CssClass="selectedrow" /> 
                .... 
            </telerik:RadGrid> 
CSS:
<style type="text/css"
        .selectedrow 
        { 
            background: None !important; 
            height22px
            bordersolid 1px white
            border-topsolid 1px white
            border-bottomsolid 1px white
            padding-left4px
        } 
        .RadGrid_Vista .rgSelectedRow td 
        { 
            border-bottom-colorwhite !important; 
        } 
    </style> 
and it looks as desired by you on my side.

Please let me know whether it is so on yours.

Kind regards,
Mira
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.
0
skysailor
Top achievements
Rank 1
answered on 18 Aug 2009, 06:25 AM
Hi,
This does not change anything. It still highlights the row. I can't believe it is so hard to stop row selection highlighting!
Note that I am using v2008.3.
Clayton
0
Mira
Telerik team
answered on 18 Aug 2009, 03:21 PM
Hello Clayton,

Could please tell me in which skin you are trying to disable highlighting and confirm that my code is not working for you for the Vista skin?

Looking forward to your reply,
Mira
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.
0
skysailor
Top achievements
Rank 1
answered on 18 Aug 2009, 11:12 PM
Hi,
I have decided not to use row selection on my page. It is too hard. I have just added a template column with a checkbox in it.
If you specify a class for the selected rows then why does the built in class get used at all? I don't get it. If I specify a custom class and put nothing in it then there should be no highlighting.
Clayton
0
Princy
Top achievements
Rank 2
answered on 19 Aug 2009, 07:28 AM
Hi Clayton,

From my understanding the Grid Skin is taking precedence over the custom css styles. While using a custom css style we need to override the default skin settings with !important key word.

<style type="text/css">  
        .selectedrow  
        {  
            background: None !important;  
            height22px;  
            bordersolid 1px white;  
            border-topsolid 1px white;  
            border-bottomsolid 1px white;  
            padding-left4px;  
        }  
        .RadGrid_[SkinName] .rgSelectedRow td  
        {  
            border-bottom-colorwhite !important;  
        }  
    </style> 

Regards
Princy

0
Guchi
Top achievements
Rank 1
answered on 17 Jun 2011, 08:26 PM
I'm trying demo version.
I need highlighted when user do rowclick.
But not highlighted when user click in GridClientSelectColumn

it is posible?
0
Shinu
Top achievements
Rank 2
answered on 10 May 2013, 01:34 PM
Hi,

One Option is to access the GridClientSelectColumn in ItemCreated event of RadGrid and attach CheckChanged event of the CheckBox(GridClientSelectColumn ). Inside the event handler access the GridDataItem as NamingContainer of the CheckBox and set a CssClass for the GridDataItem. You can remove the BackGround color/image of the selected item in CSS.

Thanks,
Shinu.
Tags
Grid
Asked by
skysailor
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
skysailor
Top achievements
Rank 1
Mira
Telerik team
Princy
Top achievements
Rank 2
Guchi
Top achievements
Rank 1
Share this question
or