ComponentOne SuperPanel for ASP.NET AJAX: SuperPanel for ASP.NET AJAX Top Tips

SuperPanel for ASP.NET AJAX Top Tips

The following tips will help you when you are using the C1SuperPanel control.

Tip1: MaintainScrollPositionOnPostback property

You can set the MaintainScrollPositionOnPostback property of C1SuperPanel to indicate whether to maintain scroll position between post back.

If this property is set to false on each post back the scroll position will reset to 0.

Tip2: Understanding the BubbleScrollingEvent property

The BubbleScrollingEvent property indicates whether to bubble mouse scrolling event to C1SuperPanel parent if the scroller has reached either bound. For example, if we have two nested C1SuperPanels and we are using mouse scrolling to scroll the inner C1SuperPanel, when the inner C1SuperPanel reaches either bound (that is to say the scroller cannot be scrolled anymore) it will test the BubbleScrollingEvent to determine whether it should bubble the mouse scrolling event to its parent which in our case is the outer C1SuperPanel. If the value is true, mouse scrolling will raise the scrolling of the outer C1SuperPanel.

Tip3: Adding keyboard support to C1SuperPanel

C1SuperPanel supports using the keyboard by using specific keys to perform scrolling. To disable key board scrolling, set the KeyboardSupport property to false.

Supported Keys:

The following table describes the functionality of specific keys in the keyboard that can be used for scrolling to areas within C1SuperPanel.

 

Key

Shif Button Pressed

Effect

Key.Left

True

Scrolls a large change to the left.

Key.Right

True

Scrolls a large change to the right.

Key.Up

True

Scrolls a large change to the top.

Key.Down

True

Scrolls a large change to the bottom.

Key.Left

False

Scrolls a small change to the left.

Key.Right

False

Scrolls a small change to the right.

Key.Up

False

Scrolls a small change to the top.

Key.Down

False

Scrolls to a small change to the bottom.

Key.Home

 

Scrolls to the minimum value.

Key.End

 

Scrolls to the maximum value

 

Tip 4: Understanding the EnableGestureScrolling property

C1SuperPanel can be scrolled by dragging the mouse. The EnableGestureScrolling (default to true) property determines whether this feature is enabled. You can disable this feature by setting this property to false.

Tip 5: Set scroller value at client side

You can change the scroller position by setting the value at client-side using the following script:

        function setValue() {

            var sp = $find('C1SuperPanel1');

            // set scroller value

            sp.get_panelBehavior().get_vScroller().set_value(100);

            // repaint scroller

            sp.get_panelBehavior().rePaint();

        }


Send comments about this topic to ComponentOne.
Copyright © 1987-2010 ComponentOne LLC. All rights reserved.