PDA

View Full Version : Why only one Toolbar allowed in GridView.BottomBar?



Jericho
Apr 02, 2009, 12:34 PM
Why is it that we are not allowed to add more than one toolbar at the bottom of a grid?

What I would like to be able to do is something like this:


<BottomBar>
<ext:PagingToolbar ID="PagingToolBar" runat="server" StoreID="Store1" DisplayInfo="true" />
<ext:MyCustomToolbar ID="CustomToolBar" runat="server" StoreID="Store1" />
</BottomBar>


However, I get the following error:

<HR color=silver SIZE=1 width="100%">

<H2>Only one Control allowed in this collection </H2>Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: Only one Control allowed in this collection

Source Error:

<TABLE width="100%" bgColor=#ffffcc>
<TBODY>
<TR>
<TD><CODE>Line 108: if (this.SingleItemMode &amp;&amp; this.Count > 0)
Line 109: {
Line 110: throw new InvalidOperationException("Only one Control allowed in this collection");
Line 111: }
Line 112:</PRE></CODE></TD></TR></TBODY></TABLE>
Source File: C:\Program Files\Coolite\Coolite Toolkit - Version 0.7.0\Community Edition\Coolite.Toolkit.Source\Utility\ItemsCollec tion.cs Line: 110

Vladimir
Apr 02, 2009, 12:38 PM
Hi,

It is limitation of original ExtJS grid panel.
Please see the following topic
http://forums.ext.net/showthread.php?threadid=6189-21-1.aspx
 

Jericho
Apr 02, 2009, 12:45 PM
What you are suggesting sounds very promissing but unfortunately, the BottomBar does not accept "ContainerLayout" elements. Here is the error message I get:

<H2>Parser Error </H2>Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Coolite.Ext.Web.ToolbarCollection must have items of type 'Coolite.Ext.Web.ToolbarBase'. 'ext:ContainerLayout' is of type 'Coolite.Ext.Web.ContainerLayout'.

Source Error:

<TABLE width="100%" bgColor=#ffffcc>
<TBODY>
<TR>
<TD><CODE>Line 144:
Line 145: <BottomBar>
Line 146: <ext:ContainerLayout runat="server">
Line 147: <ext:Toolbar runat="server">
Line 148: <Items></PRE></CODE></TD></TR></TBODY></TABLE>
Source File: /WebSite1/Default.aspx Line: 146

Vladimir
Apr 02, 2009, 12:51 PM
Please peruse this example

This example doesn't contain layout in BottomBar. It is emulation of multiple toolbars


<ContainerPanel>
    <ContainerLayout>
         TopBar
         TopBar
         TopBar
          Body
         BottomBar
         BottomBar

         BottomBar