Use grid button CSS class outside of grid

3 posts, 1 answers
  1. Wyatt
    Wyatt avatar
    31 posts
    Member since:
    Aug 2009

    Posted 23 Apr 2010 Link to this post

    I want to duplicate the look of a RadGrid "Previous Page" button outside of the grid.  I'm using RadFormDecorator and RadSkinManager for all controls.  The following code does not work.

    Dim btPrev As New Button  
    btPrev.Attributes.Add("CssClass""rgPagePrev"
  2. Answer
    Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 26 Apr 2010 Link to this post

    Hi Wyatt,

    The rgPagePrev CSS class (as well as all other RadGrid inner elements' CSS classes) works only if the corresponding element is placed inside a container with the RadGrid_SkinName CSS class, for example:

    <span class="RadGrid RadGrid_SkinName" style="border:0;background:transparent">
         <asp:Button ID="Button1" runat="server" CssClass="rgPagePrev" Text=" " />
    </span>

    Note two things:

    1. you need to remove the skin's border and background for the wrapper element
    2. the Text property of the button must be set to a space. For accessibility reasons, you may want to set the ToolTip property.


    Kind regards,
    Dimo
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Wyatt
    Wyatt avatar
    31 posts
    Member since:
    Aug 2009

    Posted 26 Apr 2010 Link to this post

    That works.  Thank you!
Back to Top