More in this section

Forums / Developing with Sitefinity / RadGrid in news template initialize problem

RadGrid in news template initialize problem

3 posts, 1 answered
  1. Pierre
    Pierre avatar
    433 posts
    16 Feb 2006
    18 Jan 2010
    Link to this post
    Hi Team,

    I have some troubles adding one radgrid inside one News module template. The object is add in scheduler section one RadGrid. To make this i have extended the classes and registred the radgrid but i generating one initialize error that is not very clear. If I delete from template this new radgrid section the Module initialize well, but if i add some where in my template, no more.

    protected virtual RadGrid Planning 
                    return base.Container.GetControl<RadGrid>("RadGridPlanning", false, TraverseMethod.BreadthFirst); 

    protected override void InitializeControls(Control viewContainer) 
                if (this.Planning != null) 
                    ds = new DataSet(); 
                    ds = iniplan.Load_DataSet_Ini(); 
                    this.Planning.DataSource = ds

    ItemNew.ascx template
                   <telerik:RadGrid ID="RadGridPlanning" runat="server" Width="95%" 
                            AutoGenerateColumns="False" PageSize="10" AllowSorting="True" Skin="Web20" AllowPaging="True" 
                            AllowAutomaticUpdates="True"  ShowStatusBar="true"
                            <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle> 

    The object is load the radgrid using one predefined Dataset backside and store later. I not use direct sql source.

    The initlalize error say
     Unsupported Builder "Telerik.Cms.Web.UI.Templates.RootBuilder". 
    Details: System.InvalidOperationException: Unsupported Builder "Telerik.Cms.Web.UI.Templates.RootBuilder". 
    [InvalidOperationException: Unsupported Builder "Telerik.Cms.Web.UI.Templates.RootBuilder".] 
       Telerik.Cms.Web.UI.Templates.PropertyBuilder.SetProperty(Object component, Control bindingContainer) +588 
       Telerik.Cms.Web.UI.Templates.PropertiesBuilder.SetProperties(Object component, Control bindingContainer) +131 
       Telerik.Cms.Web.UI.Templates.ObjectBuilder.CreateObject(Control bindingContainer) +497 
       Telerik.Cms.Web.UI.Templates.ControlBuilder.CreateControl(Control bindingContainer) +15 
       Telerik.Cms.Web.UI.Templates.RootBuilder.CreateChildControls(Control parent, Control bindingContainer) +250 
       Telerik.Cms.Web.UI.Templates.ObjectBuilder.CreateObject(Control bindingContainer) +432 
       Telerik.Cms.Web.UI.Templates.ControlBuilder.CreateControl(Control bindingContainer) +15 
       Telerik.Cms.Web.UI.Templates.RootBuilder.CreateChildControls(Control parent, Control bindingContainer) +250 
       Telerik.Framework.Web.StringTemplate.InstantiateIn(Control container) +46 
       Telerik.Cms.Web.UI.ViewModeControl`1.get_Container() +64 
       Telerik.Cms.Web.UI.ViewModeControl`1.CreateChildControls() +44 

    Advice, Thanks Romi.

  2. Pierre
    Pierre avatar
    433 posts
    16 Feb 2006
    27 Jan 2010
    Link to this post

    I having same problems, with no workaround. I have tested diferents scenarios. The object is to avoid similar to this sample telerik using one dataset formed backside during inititialize. 
    The problem is if your use one complex radGrid in my template for view (ContentItemNew<vVacItemsView>).

    Case1 : Using ver basic template
    <telerik:RadGrid ID="RadGridPlanning" runat="server"  GridLines="None" ShowGroupPanel="True" Width="100%" >   

     protected override void CreateChildControls()  
                //Test HERE: Inititalize Dataset as Table   
                // Store dt in public variable  
                // Bind Grid to modify  
                if (this.Planning != null)  
                    this.Planning.NeedDataSource += new GridNeedDataSourceEventHandler(RadGridPlanning_NeedDataSource);  
                    this.Planning.UpdateCommand += new GridCommandEventHandler(RadGridPlanning_UpdateCommand);  
                    this.Planning.DataSource = PlanningData;  
    In this case the view load and Radgrid is here (forming during initialize or CreateChildControls override) but you are not able to Edit/Update or Insert only view data. Now if you like add more complex case including MasterTableView...No more working

    Case2 : Need Form to Edit/Update template
    <MasterTableView DataKeyNames="EmployeeID" AllowMultiColumnSorting="True" Width="100%" 
                        <telerik:GridButtonColumn UniqueName="DeleteColumn" Text="Delete" CommandName="Delete" /> 
                        <telerik:GridBoundColumn UniqueName="FirstName" SortExpression="FirstName" HeaderText="First name" 
                            DataField="FirstName" /> 
                        <telerik:GridBoundColumn UniqueName="LastName" SortExpression="LastName" HeaderText="Last name" 
                            DataField="LastName" /> 
                        <telerik:GridDropDownColumn UniqueName="TitleOfCourtesy" ListDataMember="Employees" 
                            SortExpression="TitleOfCourtesy" ListTextField="TitleOfCourtesy" ListValueField="TitleOfCourtesy" 
                            HeaderText="Title of courtesy" DataField="TitleOfCourtesy">  
                        <telerik:GridBoundColumn UniqueName="HireDate" SortExpression="HireDate" HeaderText="Hire date" 
                            DataField="HireDate" DataFormatString="{0:d}" /> 
                        <telerik:GridEditCommandColumn UpdateText="Update" UniqueName="EditCommandColumn" 
                            CancelText="Cancel" EditText="Edit">  
                            <HeaderStyle Width="85px"></HeaderStyle> 
                    <EditFormSettings CaptionFormatString="Edit details for employee with ID {0}" CaptionDataField="EmployeeID">  
                        <FormTableItemStyle Width="100%" Height="29px"></FormTableItemStyle> 
                        <FormTableStyle GridLines="None" CellSpacing="0" CellPadding="2"></FormTableStyle> 
                        <FormStyle Width="100%" BackColor="#eef2ea"></FormStyle> 
                        <EditColumn ButtonType="ImageButton" /> 

    In this case i have one another blocking problem like FormTableItemStyle not recognized ...or no initialize. I haven't found way to create this sample  telerik  in my view.

    Nobody to help us. Thanks.

  3. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    01 Feb 2016
    28 Jan 2010
    Link to this post
    Hi Pierre,

    Thank you for using our services.

    Could you, please take a look at the following blog post: Insert/Update/Delete content items with RadGrid for ASP.NET AJAX. It explains how to enable the RadGrid to perform CRUD operations with content items from Generic Content based modules.

    Kind regards,
    Radoslav Georgiev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Register for webinar
3 posts, 1 answered