SplitterItemsCollection must contain SplitterItem objects

2 posts, 0 answers
  1. Willem
    Willem avatar
    23 posts
    Member since:
    Dec 2007

    Posted 03 Sep 2009 Link to this post

    Currently we use Telerik ASP.NET AJAX Controls version 2009.2.701.35 and get an unexpected "SplitterItemsCollection must contain SplitterItem objects" error. We have altready tried to empty the AjaxManager but the problem stays. Can anyone have a quick review of the code?

    1 <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" Title="BIS ID Content Runner for the Web " %> 
    2 <%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> 
    3 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    4 <html xmlns="http://www.w3.org/1999/xhtml">  
    5     <head id="Head1" runat="server">  
    6       
    7         <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">  
    8             <style type="text/css">  
    9                 html, body, form    
    10                     {    
    11                     margin:0px;    
    12                     padding:0px;    
    13                     height:100%;    
    14                     background-image: url(Skins/Default/Common/Default_Top.jpg);  
    15                     background-repeat: repeat-x;  
    16                     }  
    17             </style> 
    18         <link rel="stylesheet" type="text/css" href="/css/bis.css">  
    19     <script type="text/javascript">  
    20         var ArchiveShowing = ("<%= myCR.ArchiveShowing %>" == "True");  
    21         var OriginalShowing = ("<%= myCR.OriginalShowing %>" == "True");  
    22     </script> 
    23     <script type="text/javascript">  
    24         function ShowProfileForm() {  
    25             window.radopen("/Forms/Profile.aspx", "winProfile");  
    26             return false;  
    27         }  
    28     </script>    
    29     <script type="text/javascript">  
    30         function ShowInsertForm(id) {  
    31             window.radopen("/Forms/EditRecord.aspx", "insertForm");  
    32             return false;  
    33         }  
    34     </script>    
    35     <script type="text/javascript">  
    36         function ShowEditForm(id) {  
    37             window.radopen("/Forms/EditRecord.aspx?ID=" + id, "editForm");  
    38             return false;  
    39         }  
    40     </script>    
    41     <script type="text/javascript">  
    42         function ShowHelpForm() {  
    43             window.radopen("Forms/Help.aspx", "winHelp");  
    44             return false;  
    45         }  
    46     </script>    
    47     <script type="text/javascript">  
    48  
    49         function ShowAboutForm() {  
    50             window.radopen("Forms/About.aspx", "winAbout");  
    51             return false;  
    52         }  
    53     </script>    
    54     <script type="text/javascript">  
    55       
    56         function RefreshGrid() {  
    57             var masterTable = $find("<%= grMain.ClientID %>").get_masterTableView();  
    58             masterTable.rebind();  
    59             }   
    60     </script>    
    61     <script type="text/javascript">  
    62  
    63         function RowSelected(sender, args) {  
    64                 var toolBar = $find("<%=tbMain.ClientID %>");  
    65                 var grid = $find("grMain");  
    66                 var MasterTable = grid.get_masterTableView();  
    67                 var SelectedRows = MasterTable.get_selectedItems();  
    68                 if (SelectedRows.length > 1) toolBar.findItemByValue("tbWijzig").disable();  
    69                 if (SelectedRows.length < 1) toolBar.findItemByValue("tbWijzig").disable();  
    70                 if (SelectedRows.length == 1) toolBar.findItemByValue("tbWijzig").enable();  
    71                 toolBar.findItemByValue("tbVerwijder").enable();  
    72                 if (SelectedRows.length < 1) toolBar.findItemByValue("tbVerwijder").disable()  
    73  
    74                 if (ArchiveShowing) {  
    75  
    76                     toolBar.findItemByValue("tbNaarArch").disable();  
    77                     if (SelectedRows.length > 0)  
    78                         toolBar.findItemByValue("tbNaarOrg").enable();  
    79                     if (SelectedRows.length < 1)  
    80                         toolBar.findItemByValue("tbNaarOrg").disable();  
    81                           
    82                 }  
    83  
    84                 if (OriginalShowing) {  
    85  
    86                     toolBar.findItemByValue("tbNaarOrg").disable();  
    87                     if (SelectedRows.length > 0)  
    88                         toolBar.findItemByValue("tbNaarArch").enable();  
    89                     if (SelectedRows.length < 1)  
    90                         toolBar.findItemByValue("tbNaarArch").disable();  
    91                           
    92                 }  
    93             }           
    94               
    95     </script> 
    96         </telerik:RadCodeBlock>          
    97       
    98     </head> 
    99       
    100     <body class="BODY">  
    101         <form id="FormMain" method="post" runat="server">  
    102         <telerik:RadScriptManager  
    103             ID="ScriptManager" 
    104             runat="server"   
    105             EnableTheming="True">  
    106         </telerik:RadScriptManager> 
    107           
    108         <telerik:RadAjaxManager  
    109             ID="amMain" 
    110             runat="server" onajaxrequest="amMain_AjaxRequest">  
    111             <AjaxSettings> 
    112                 <telerik:AjaxSetting AjaxControlID="amMain">  
    113                     <UpdatedControls> 
    114                         <telerik:AjaxUpdatedControl ControlID="tbMain" /> 
    115                         <telerik:AjaxUpdatedControl ControlID="lblKop" /> 
    116                         <telerik:AjaxUpdatedControl ControlID="grMain" /> 
    117                     </UpdatedControls> 
    118                 </telerik:AjaxSetting> 
    119                 <telerik:AjaxSetting AjaxControlID="tbMain">  
    120                     <UpdatedControls> 
    121                         <telerik:AjaxUpdatedControl ControlID="tbMain" /> 
    122                         <telerik:AjaxUpdatedControl ControlID="lblKop" /> 
    123                         <telerik:AjaxUpdatedControl ControlID="grMain" /> 
    124                     </UpdatedControls> 
    125                 </telerik:AjaxSetting> 
    126                 <telerik:AjaxSetting AjaxControlID="LeftPane">  
    127                     <UpdatedControls> 
    128                         <telerik:AjaxUpdatedControl ControlID="LeftPane"/>  
    129                     </UpdatedControls> 
    130                 </telerik:AjaxSetting> 
    131                 <telerik:AjaxSetting AjaxControlID="grMain">  
    132                     <UpdatedControls> 
    133                         <telerik:AjaxUpdatedControl ControlID="tbMain" /> 
    134                         <telerik:AjaxUpdatedControl ControlID="lblKop" /> 
    135                         <telerik:AjaxUpdatedControl ControlID="grMain" /> 
    136                     </UpdatedControls> 
    137                 </telerik:AjaxSetting> 
    138             </AjaxSettings> 
    139         </telerik:RadAjaxManager> 
    140           
    141             <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server"></telerik:RadStyleSheetManager> 
    142                    
    143                     <asp:SqlDataSource  
    144                         ID="dsPanelbar" 
    145                         runat="server"   
    146                         ConnectionString="<%$ ConnectionStrings:ContentRunner %>"   
    147                         SelectCommand="SELECT * FROM [q_navbarweb]"   
    148             onselecting="dsPanelbar_Selecting">  
    149                     </asp:SqlDataSource> 
    150               
    151                     <asp:SqlDataSource  
    152                         ID="dsGrid" 
    153                         runat="server"   
    154                         ConnectionString="<%$ ConnectionStrings:ContentRunner %>"   
    155                         oninit="dsGrid_Init"   
    156                         SelectCommand="SELECT * FROM [t_bezoekers]">  
    157                     </asp:SqlDataSource> 
    158                               
    159                 <div width="100%"  border="0px" class=workplace>  
    160                     <telerik:RadToolBar  
    161                         ID="tbMain" 
    162                         style="clear:both" 
    163                         Runat="server" 
    164                         Width="100%" 
    165                         BorderStyle="None" 
    166                         BorderWidth="0px"   
    167                         onbuttonclick="tbMain_ButtonClick"   
    168                         Font-Bold="True"   
    169                         Font-Names="Trebuchet MS" Font-Size="12pt">  
    170                         <CollapseAnimation  
    171                             Type="OutQuint" 
    172                             Duration="200">  
    173                         </CollapseAnimation> 
    174                         <Items> 
    175                             <telerik:RadToolBarButton runat="server" value="tbProfiel"          Text="Hallo, Gebruiker"    CommandName="cmdProfiel"></telerik:RadToolBarButton> 
    176                             <telerik:RadToolBarButton runat="server" Text="sep1"                IsSeparator="True"></telerik:RadToolBarButton> 
    177                             <telerik:RadToolBarButton runat="server" value="tbNieuw"            Text="Nieuw"               CommandName="cmdNieuw"></telerik:RadToolBarButton> 
    178                             <telerik:RadToolBarButton runat="server" value="tbWijzig"           Text="Wijzig"              CommandName="cmdWijzig"></telerik:RadToolBarButton> 
    179                             <telerik:RadToolBarButton runat="server" value="tbVerwijder"        Text="Verwijder"           CommandName="cmdVerwijder"></telerik:RadToolBarButton> 
    180                             <telerik:RadToolBarButton runat="server" Text="sep2"                IsSeparator="True"></telerik:RadToolBarButton> 
    181                             <telerik:RadToolBarButton runat="server" value="tbNaarOrg"          Text="Naar Origineel"      CommandName="cmdNaarOrg"></telerik:RadToolBarButton> 
    182                             <telerik:RadToolBarButton runat="server" value="tbNaarArch"         Text="Naar Archief"        CommandName="cmdNaarArch"></telerik:RadToolBarButton> 
    183                             <telerik:RadToolBarButton runat="server" IsSeparator="True"         Text="sep3"></telerik:RadToolBarButton> 
    184                             <telerik:RadToolBarButton runat="server" value="tbShowOrg"          Text="Toon Orginelen"      CommandName="cmdToonOrg"></telerik:RadToolBarButton> 
    185                             <telerik:RadToolBarButton runat="server" value="tbShowArch"         Text="Toon Archief"        CommandName="cmdToonArch"></telerik:RadToolBarButton> 
    186                             <telerik:RadToolBarButton runat="server" Text="sep4"                IsSeparator="True"></telerik:RadToolBarButton> 
    187                             <telerik:RadToolBarButton runat="server" value="tbLogUit"           Text="Log uit"             CommandName="cmdLogUit"></telerik:RadToolBarButton> 
    188                             <telerik:RadToolBarButton runat="server" value="tbHelp"             Text="Help"                CommandName="cmdHelp"></telerik:RadToolBarButton> 
    189                             <telerik:RadToolBarButton runat="server" value="tbAbout"            Text="About"               CommandName="cmdAbout"></telerik:RadToolBarButton> 
    190                         </Items> 
    191                     </telerik:RadToolBar><div style="clear:both"><!-- --></div>  
    192                     </div> 
    193                     <div class=workplace>  
    194                 <telerik:radsplitter  
    195                     id="splMain" 
    196                     runat="server" 
    197                     height="100%" 
    198                     width="100%"   
    199                     Skin="Office2007" 
    200                     style="clear:both" 
    201                     HeightOffset="30">  
    202                     <telerik:radpane  
    203                         id="LeftPane" 
    204                         runat="server" 
    205                         height="100%" 
    206                         width="212">  
    207                         <telerik:RadPanelBar  
    208                             ID="pbMain" 
    209                             Runat="server" 
    210                             DataFieldID="ID"   
    211                             DataFieldParentID="ParentID" 
    212                             DataSourceID="dsPanelbar" 
    213                             DataTextField="Text"   
    214                             onitemdatabound="pbMain_ItemDataBound"   
    215                             width="100%" 
    216                             Skin="Outlook"   
    217                             CookieName="ContentRunnerPanelBar"   
    218                             ExpandMode="FullExpandedItem"   
    219                             PersistStateInCookie="True"   
    220                             CollapseDelay="200" ExpandDelay="200" onitemclick="pbMain_ItemClick">  
    221                             <CollapseAnimation   
    222                                 Duration="220"   
    223                                 Type="InOutElastic" /> 
    224                             <ExpandAnimation   
    225                                 Duration="220"   
    226                                 Type="InOutElastic" /> 
    227                         </telerik:RadPanelBar><div style="clear:both"><!-- --></div>  
    228                     </telerik:radpane> 
    229                     <telerik:radsplitbar id="RadSplitBar1" runat="server" style="clear:both"></telerik:radsplitbar> 
    230                     <telerik:radpane id="MainPane" runat="server" style="clear:both">  
    231                     <telerik:RadAjaxPanel  
    232                         BackImageUrl="~/Common/Images/AppMain/AppMainToolbarBackGround.jpg"   
    233                         style="clear:both" 
    234                         ID="apMain" 
    235                         runat="server" 
    236                         height="32px" 
    237                         width="100%">  
    238                           <asp:Panel   
    239                                 ID="Panel3"   
    240                                 runat="server"   
    241                                 Height="33px"   
    242                                 Width="100%"   
    243                                 BackImageUrl="~/Common/Images/AppMain/AppMainToolbarBackGround3.jpg" CssClass="GridAltRow_Outlook">  
    244                                 <asp:Panel   
    245                                     ID="Panel1"   
    246                                     runat="server"   
    247                                     Height="4px"   
    248                                     Width="100%">  
    249                                 </asp:Panel> 
    250                                 <asp:Label  
    251                                     ID="lblKop" 
    252                                     runat="server" 
    253                                     BorderStyle="None"   
    254                                     BorderWidth="6px" 
    255                                     Font-Names="Trebuchet MS" 
    256                                     Font-Size="Medium"   
    257                                     Text="&amp;nbsp;&amp;nbsp;::BIS ID Content Runner"></asp:Label> 
    258                             </asp:Panel> 
    259                     </telerik:RadAjaxPanel> 
    260                 <telerik:RadGrid  
    261                     ID="grMain" 
    262                     runat="server" 
    263                     AllowFilteringByColumn="True"   
    264                     AllowPaging="True" 
    265                     AllowSorting="True"   
    266                     DataSourceID="dsGrid" 
    267                     GridLines="None"   
    268                     Height="99%" 
    269                     Skin="Outlook" 
    270                     Width="99%"   
    271                     onitemcommand="grMain_ItemCommand"   
    272                     onneeddatasource="grMain_NeedDataSource" 
    273                     oncolumncreated="grMain_ColumnCreated" 
    274                     AllowAutomaticDeletes="True" 
    275                     AllowAutomaticInserts="True" 
    276                     AllowAutomaticUpdates="True"   
    277                     AllowCustomPaging="True" 
    278                     onitemdatabound="grMain_ItemDataBound"   
    279                     onprerender="grMain_PreRender" 
    280                     ShowFooter="True" 
    281                     ShowStatusBar="True" PageSize="100" VirtualItemCount="10"   
    282                             AllowMultiRowSelection="True"   
    283                             onselectedindexchanged="grMain_SelectedIndexChanged">  
    284                     <PagerStyle AlwaysVisible="True" EnableSEOPaging="True" /> 
    285                 <MasterTableView   
    286                     DataSourceID="dsGrid" 
    287                     allowcustomsorting="True" 
    288                                     datakeynames="ID"   
    289                                     CommandItemDisplay="Top">  
    290                                     <RowIndicatorColumn Visible="False">  
    291                                         <HeaderStyle Width="20px" /> 
    292                                     </RowIndicatorColumn> 
    293                                     <ExpandCollapseColumn Resizable="False" Visible="False">  
    294                                         <HeaderStyle Width="20px" /> 
    295                                     </ExpandCollapseColumn> 
    296                                     <CommandItemTemplate> 
    297                                         <img src="Skins/Outlook/Grid/AddRecord.gif" /><a href="#" onclick="return ShowInsertForm();">Nieuw</a> 
    298                                         <img src="Skins/Outlook/Grid/AddRecord.gif" /><a href="#" onclick="return RefreshGrid(1);">Ververs tabel</a> 
    299                                     </CommandItemTemplate> 
    300                                     <Columns> 
    301                                         <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" /> 
    302                                         <telerik:GridButtonColumn  
    303                                             ButtonType="LinkButton" 
    304                                             CommandArgument="{0}"   
    305                                             CommandName="MyEdit" 
    306                                             HeaderText="" 
    307                                             Text="Wijzig" 
    308                                             UniqueName="colEdit">  
    309                                         </telerik:GridButtonColumn> 
    310                                         <telerik:GridButtonColumn  
    311                                             ButtonType="LinkButton" 
    312                                             CommandArgument="{0}"   
    313                                             CommandName="MyDelete" 
    314                                             ConfirmText="Wilt u deze regel verwijderen?"   
    315                                             HeaderText="" 
    316                                             Text="Verwijder" 
    317                                             UniqueName="colDelete">  
    318                                         </telerik:GridButtonColumn> 
    319                                     </Columns> 
    320                                     <EditFormSettings> 
    321                                         <PopUpSettings ScrollBars="None" /> 
    322                                     </EditFormSettings> 
    323                                 </MasterTableView> 
    324                                 <ClientSettings  
    325                                     allowkeyboardnavigation="True">  
    326                                     <Selecting AllowRowSelect="True" /> 
    327                                 </ClientSettings> 
    328                             <FilterMenu EnableTheming="True" Skin="Outlook">  
    329                         <CollapseAnimation Duration="200" Type="OutQuint" /> 
    330                     </FilterMenu> 
    331                 </telerik:RadGrid> 
    332                         <br /> 
    333                     </telerik:radpane> 
    334                 </telerik:radsplitter> 
    335         <telerik:RadWindowManager   
    336             ID="wmMain"   
    337             runat="server"   
    338             Skin="Default"   
    339             Height="500px"   
    340             Left="50px"   
    341             oninit="wmMain_Init"   
    342             Top="50px"   
    343             Width="700px">  
    344             <Windows> 
    345                 <telerik:RadWindow   
    346                     ID="winEdit"   
    347                     runat="server"   
    348                     Height="500px" 
    349                     Left="100px" 
    350                     NavigateUrl="Forms\EditRecord.aspx" 
    351                     style="display:none;" 
    352                     Top="100px" 
    353                     Width="700px" 
    354                     Modal="True"   
    355                     Behaviors="Close" BorderWidth="0px">  
    356                 </telerik:RadWindow> 
    357                   
    358                 <telerik:RadWindow   
    359                     ID="winProfile"   
    360                     runat="server"   
    361                     Left="100px"   
    362                     NavigateUrl="Forms\Profile.aspx"   
    363                     style="display:none;"   
    364                     Top="100px"   
    365                     width="400" 
    366                     height="256" 
    367                     Title="Profile"   
    368                     Behaviors="Move"   
    369                     Modal="True"   
    370                     VisibleStatusbar="False">  
    371                 </telerik:RadWindow> 
    372                   
    373                 <telerik:RadWindow   
    374                     ID="winHelp"   
    375                     runat="server"   
    376                     Left="100px"   
    377                     NavigateUrl="Forms\Help.aspx"   
    378                     style="display:none;"   
    379                     Top="100px"   
    380                     width="400" 
    381                     height="256" 
    382                     Title="help" 
    383                     Behaviors="Close" 
    384                     Modal="True"   
    385                     VisibleStatusbar="False" Behavior="Close">  
    386                 </telerik:RadWindow> 
    387  
    388                 <telerik:RadWindow   
    389                     ID="winAbout"   
    390                     runat="server"   
    391                     Left="100px"   
    392                     NavigateUrl="Forms/About.aspx"   
    393                     style="display:none;"   
    394                     Top="100px"   
    395                     width="400" 
    396                     height="256" 
    397                     Title="help" 
    398                     Behaviors="Close" 
    399                     Modal="True"   
    400                     VisibleStatusbar="False" Behavior="Close">  
    401                 </telerik:RadWindow> 
    402             </Windows> 
    403         </telerik:RadWindowManager> 
    404     </form> 
    405 </body> 
    406 </html> 
  2. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 07 Sep 2009 Link to this post

    Hi Willem,
    As soon as I removed the following setting from the AjaxSettings of the RadAjaxManager, the problem was solved:
    <telerik:RadAjaxManager ID="amMain" runat="server"
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="amMain"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="tbMain" /> 
                    <telerik:AjaxUpdatedControl ControlID="lblKop" /> 
                    <telerik:AjaxUpdatedControl ControlID="grMain" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="tbMain"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="tbMain" /> 
                    <telerik:AjaxUpdatedControl ControlID="lblKop" /> 
                    <telerik:AjaxUpdatedControl ControlID="grMain" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <%--<telerik:AjaxSetting AjaxControlID="LeftPane"
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="LeftPane" /> 
                </UpdatedControls>
            </telerik:AjaxSetting>--%>
            <telerik:AjaxSetting AjaxControlID="grMain"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="tbMain" /> 
                    <telerik:AjaxUpdatedControl ControlID="lblKop" /> 
                    <telerik:AjaxUpdatedControl ControlID="grMain" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 

    You cannot use such a setting as by defining it, you configure the RadAjaxManager to wrap the RadPane in an UpdatePanel. Thus you get an UpdatePanel as a child of the RadSplitter.

    All the best,
    Tsvetie
    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top