views:

243

answers:

2

I have a Rad Grid and I simply want the cursor to be a pointer on hover of every row. I've tried Css classes and it hasn't worked. I know there is a simple solution, i just don't know how to do it. Below is what i've tried

<style type="text/css">
.UseHand
{
    cursor: pointer;
}

 <telerik:RadGrid ID="RadGrid1" Skin="WB" runat="server" AutoGenerateColumns="false" DataSourceID="DSID">
                    <GroupingSettings CaseSensitive="false" />
                    <SelectedItemStyle CssClass="UseHand" />
                    <MasterTableView>BLAH BLAH</MasterTableView>
                    <ClientSettings EnableRowHoverStyle="true">
                        <Selecting AllowRowSelect="True"  />
                        <ClientEvents />
                    </ClientSettings>
 </telerik:RadGrid>

Any help on this would be greatly appreciated!

+1  A: 

Try changing:

<SelectedItemStyle CssClass="UseHand" />

To:

<ItemStyle CssClass="UseHand" />

SelectedItemStyle represents the currently selected row, where ItemStyle represents all rows.

Mike
Mike, No luck. any other ideas?
Eric
+1  A: 

I have 2 ideas for you:

Idea 1: In your example, you added the class to the SelectedItemStyle, which I believe is the only the selected row(s), not all of them. Instead you could try:

<ItemStyle CssClass="UseHand" />

Idea 2:

You could also try forcing the issue with:

.UseHand
{
    cursor: pointer !important;
}

and add the class to the grid itself:

 <telerik:RadGrid ID="RadGrid1" Skin="WB" CssClass="UseHand" runat="server" AutoGenerateColumns="false" DataSourceID="DSID">

This should override any build in styles and inline styles generated by the RadGrid.

KP
Kevin, I tried these things. They didn't work. However, I can see the hand if i hover over the very top of the grid or the very bottom. It seems to have applied it to the Grid. Should i apply this to the MasterTAbleView itself? It's where my columns are.
Eric
Yeah I would try adding the class to each element until you find the one that works. I'm surprised it doesn't work on the grid level as it should override. If the master table tag accepts the CssClass attribute that may work.
KP
Also - do you use Firefox/Firebug? If so, you can inspect the html element for the row or cell level (likely table based so the tr or td tag) and check where the cursor setting is coming from in the CSS pane...
KP
i'll try it out in firefox
Eric
i tried adding to each element and i had to add it to each column. ItemStyle-CSSClass = "UseHand" is what worked. Thanks Kevin!
Eric
Glad to help :). FYI I took a look at the markup locally (We use Telerik Controls as well).. seems the pointer is set at the `tr` level by the built-in class `.rgRow` and any skin-level classes like `.RadGrid_WebBlue` etc., so I'd suspect `.UseHand .rgRow { cursor: pointer !important }` with `UseHand` applied at the `RadGrid` level would work too.
KP