Grid weird Selected on Alternate row when we have an AlternateStyle applied

4 posts, 0 answers
  1. Alex
    Alex avatar
    77 posts
    Member since:
    Mar 2008

    Posted 06 Jan 2012 Link to this post

    Created a theme from Black using the Style Builder.

    Everything looks great except for we have a selected row on an Alternate Row that has an AlternateRow Style.

    What's happening is it looks like there's a conflict between the Selected Row style and the AlternateRow style, the Selected Row style is never applied to it. I spent 5 hours yesterday working with the .css file for my grid to no avail (I'm not a CSS expert by a long shot so...).

    What I did is I created multiple styles using Style Builder and all had the issue in common.

    Does anyone know which css needs to be changed/applied.

    Any documentation on the css used? I found some but it was for ASP.Net and not ASP.Net Ajax on the Telerik site.

    Thanks
  2. Galin
    Admin
    Galin avatar
    526 posts

    Posted 11 Jan 2012 Link to this post

    Hello Alex,

    You can change the select or hover background for the Office2007 Skin with this CSS:
    div.RadGrid_Office2007 .rgRow { /* change the background colour of rows */
        background: white;
    }
     
     div.RadGrid_Office2007 .rgAltRow { /* change the  background colour for Alternated  rows */
        background: grey;
    }
     
    div.RadGrid_Office2007 .rgSelectedRow {  /* change the background colour for alternated  rows */
     
        background: LightBlue;
    }
     
    div.RadGrid_Office2007 .rgHoveredRow { /* change the background colour for hovered rows */
        background: green;
    }

    For other Skins, replace _Office2007 with their _Name, read here more examples.

    Also please read how to get familiar with HTML rendering of Controls.

    I hope this helps.

    All the best,
    Galin
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Alex
    Alex avatar
    77 posts
    Member since:
    Mar 2008

    Posted 24 Jan 2012 Link to this post

    I didn't know you had replied to my message, I usually get a notice saying a thread was been updated but didn't for this one.

    Those changes have been done in my css but again the alternate rows do not get the selected css applied when the alternate row has a css specfied.

    If I remove the alternate row's css then the selected css is being applied to the alternate row when it is selected.

    If I use one of the built in skins everything works great, but if I use the skin that was done by the Stylebuilder it isn't working properly (even after I make sure that the proper styles are there in the .css file).

    For the moment I have been able to implement a javascript solution.



  5. Galin
    Admin
    Galin avatar
    526 posts

    Posted 25 Jan 2012 Link to this post

    Hello Alex,

    Thank you for your reply.

    Please check out the sample project in the attached file and let me know if it works for you or if I missed something out.

    I hope this helps.

    All the best,
    Galin
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top