Is there a way to "lock" a zone once a pre-determined number of docks have been moved into it? I tried setting enabled = false once the zone.docks.count hits a certain number but I can still add more docks into it after disabling. TIA
1 Answer, 1 is accepted
0
Sophy
Telerik team
answered on 26 May 2008, 08:21 AM
Hi Craig,
The RadDockZone does not provide a property which can be set to lock the zone if a predetermined limit of docks have already been docked in it. If you want to avoid users dropping docks in a zone in which there already are a predetermined number of docks I could suggest you use the OnClientDragStart and the OnClientDragEnd client events to do the check. At the OnClientDragStart you can save the dock's current parent zone and at OnClientDragEnd check the number of docks of the zone in which the dock is just dropped and if it is greater than the predetermined limit for the corresponding zone return the just dropped dock to its previous location.
If you want to dock a dock object in a zone with javascript code if the docks in the zone do not exceed the predetermined limit you can do the check just before the code which docks the dock.