Skip to main content
A newer version of this page is available. .

ASPxClientDockZone.GetPanelCount Method

Gets the number of panels contained in the zone.

Declaration

GetPanelCount(): number

Returns

Type Description
number

An integer value specifying the number of panels contained within the zone.

Remarks

The GetPanelCount method returns the total number of panels within the zone, including invisible ones. The zone’s panel collection can be accessed by using the ASPxClientDockZone.GetPanels method. To obtain a particular panel’s visibility, use the ASPxClientPopupControlBase.IsVisible method.

Example

The code sample below demonstrates how you can limit the number of panels contained within a zone.

<dx:ASPxDockZone ID="MyASPxDockZone" runat="server" ZoneUID="MyZone">
     <ClientSideEvents BeforeDock="function(s, e) {
          if (s.GetPanelCount() > 2) 
          e.cancel = true;
     }" />
</dx:ASPxDockZone>
See Also