RadToolBar inside RibbonBarTemplateItem

3 posts, 0 answers
  1. Richard
    Richard avatar
    28 posts
    Member since:
    Jun 2010

    Posted 03 Apr 2015 Link to this post

    Hi,

     I have a ribbon bar that has a ribbon bar template item.  Inside the template is a RadToolBar.  When I load my page in Chrome, I get a client error.  I don't receive the same error when using Internet Explorer.  If I take the radtoolbar out, the error no longer occurs.  The error is causing my page to stop loading.  I have attached a simple example below.  If you run this page in Chrome you will see the error via the F12 developer console.  It says "Value must not be null for Controls and Behaviors".  Any help with this would be greatly appreciated.  

     

    Thank you!

    Richard

     

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebTestApplication.Default" %>
     
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
     
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
            <asp:ScriptManager runat="server"></asp:ScriptManager>
        <telerik:RadRibbonBar ID="TestRibbonBar" runat="server"
            EnableAjaxSkinRendering="true"
            Visible="True" Skin="Windows7" Width="100%"
            Height="100px" CssClass="RadToolBarHeight">
            <telerik:RibbonBarTab ID="rbtTest" Width="250px">
                <telerik:RibbonBarGroup ID="rbgSearch" Text="Search Tests" Value="TestSearch"
                    BorderStyle="None" CssClass="TestSearchBar">
                    <Items>                   
                        <telerik:RibbonBarTemplateItem ID="rbtItem" BorderStyle="None" CssClass="TestSearchBar" >
                            <Template>               
                                <telerik:RadToolBar ID="tlbSearch" runat="server" CausesValidation="False" AutoPostBack="True"
                                    CssClass="TestSearchBar" Skin="Windows7" BorderStyle="None" >
                                    <Items>
                                        <telerik:RadToolBarButton CommandName="SearchBy" CommandArgument="none" runat="server"
                                            Text="" CausesValidation="false" CssClass="TestSearchBar_SearchByBtn">
                                            <ItemTemplate>
                                            </ItemTemplate>
                                        </telerik:RadToolBarButton>
     
                                         
                                    </Items>
                                </telerik:RadToolBar>
                            </Template>
                        </telerik:RibbonBarTemplateItem>
                    </Items>
                </telerik:RibbonBarGroup>
            </telerik:RibbonBarTab>
        </telerik:RadRibbonBar>
        </form>
    </body>
    </html>

  2. Ivan Danchev
    Admin
    Ivan Danchev avatar
    829 posts

    Posted 08 Apr 2015 Link to this post

    Hello,

    Could you please try removing the <Template> so the RadToolBar is embedded directly in the RibbonBarTemplateItem. You can see this approach used in our Templates demo and at my side it works without js errors.

    Regards,
    Ivan Danchev
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Richard
    Richard avatar
    28 posts
    Member since:
    Jun 2010

    Posted 08 Apr 2015 Link to this post

    Hi Ivan, 

    Thank you very much that worked!

    Richard

Back to Top