Question about RadGrid

3 posts, 1 answers
  1. J
    J avatar
    143 posts
    Member since:
    Jun 2006

    Posted 02 Mar 2010 Link to this post

    Working with this rad grid
    <telerik:RadMenu ID="RadMenu1" runat="server"   
        Width="100%" OnItemClick="RadMenu1_ItemClick"   
        > 
        <Items> 
            <telerik:RadMenuItem Text="Item1" runat="server"   
            Selected="true" 
                /> 
            <telerik:RadMenuItem Text="Item2" runat="server"   
                
                /> 
            <telerik:RadMenuItem Text="Item3" runat="server"   
                
                /> 
            <telerik:RadMenuItem Text="Item4" runat="server"   
                
                /> 
        </Items> 
    </telerik:RadMenu> 

    And it appears that all the menu items are more on the left side of the screen.  how do i get them so that they are center aligned with widths of 25%.  I tried doing RadMenuItem.width = "25%" but doing that on each of them makes it wrap to the next line.  It also doesnt center the text, so not sure what to do.

    J
  2. Answer
    Schlurk
    Schlurk avatar
    812 posts
    Member since:
    May 2009

    Posted 02 Mar 2010 Link to this post

    The following ASPX markup worked for me :)

    <html xmlns="http://www.w3.org/1999/xhtml"
    <head runat="server"
        <title></title
        <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" /> 
        <style type="text/css"
            div.RadMenu .rmItem 
            { 
                padding: 0; 
            } 
     
            div.RadMenu .rmLink, 
            div.RadMenu .rmText 
            { 
                float: none; 
                text-align: center; 
            } 
        </style> 
    </head> 
    <body> 
        <form id="form1" runat="server"
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
            <Scripts> 
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" /> 
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" /> 
            </Scripts> 
        </telerik:RadScriptManager> 
        <telerik:RadMenu ID="RadMenu1" runat="server" Skin="Forest" Width="100%" Flow="Horizontal"
            <Items> 
                <telerik:RadMenuItem runat="server" Text="Root RadMenuItem1" Width="25%"
                </telerik:RadMenuItem> 
                <telerik:RadMenuItem runat="server" Text="Root RadMenuItem2" Width="25%"
                </telerik:RadMenuItem> 
                <telerik:RadMenuItem runat="server" Text="Root RadMenuItem3" Width="25%"
                </telerik:RadMenuItem> 
                <telerik:RadMenuItem runat="server" Text="Root RadMenuItem4" Width="25%"
                </telerik:RadMenuItem> 
            </Items> 
        </telerik:RadMenu> 
        </form> 
    </body> 
    </html> 

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. J
    J avatar
    143 posts
    Member since:
    Jun 2006

    Posted 02 Mar 2010 Link to this post

    Thanks Schlurk that seemed to work.  Lord knows how you figured that out.  I guess you studied the view source alot.

    J
Back to Top