This is a migrated thread and some comments may be shown as answers.

Many Nested RadExpanders with Scrolling

1 Answer 84 Views
Expander
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 22 Jul 2011, 09:02 AM
Hi,

I have the following code in a silverlight page.

The expanders are being built dynamically and driven by the contents of a hierarchy that does not have a fixed depth. Sometimes it is only 1 level, sometimes it can be 10. This dynamic hierarchy is a key feature of the application.

At the LOWEST level of hierarchy there is a grid of data content - demonstrated by a text box in the above code snippet. This grid may be 1 row, it may be 50 rows.; At each of the hierarchy levels, there will be a final TextBox in that section offering summary information (Including the lowest level)

The problem I am faced with is simple to visualise, but hard to understand how to achieve (I'm relatively new to the expander and so forth)...
Q. I want to make each of the hierarchy levels occupy sufficient space to store all of the child controls without scroll bars in that level, but I want the "overall" scrolling to be controlled by a single scroll bar contained at the root expander level.

<telerik:RadExpander Header="TestExpander 1">
    <telerik:RadExpander Header="TestExpander 1A">
        <telerik:RadExpander Header="TestExpander 1B">
            <StackPanel>
                <telerik:RadExpander Header="TestExpander 1C">
                    <TextBox Text =" Some Text box " Height="200"></TextBox>
                </telerik:RadExpander>
                <telerik:RadExpander Header="TestExpander 2C">
                    <TextBox Text =" Some Text box " Height="200"></TextBox>
                </telerik:RadExpander>
                <telerik:RadExpander Header="TestExpander 3C">
                    <TextBox Text =" Some Text box " Height="200"></TextBox>
                </telerik:RadExpander>
                <telerik:RadExpander Header="TestExpander 4C">
                    <TextBox Text =" Some Text box " Height="200"></TextBox>
                </telerik:RadExpander>
                <telerik:RadExpander Header="TestExpander 5C">
                    <TextBox Text =" Some Text box " Height="200"></TextBox>
                </telerik:RadExpander>
                <telerik:RadExpander Header="TestExpander 6C">
                    <TextBox Text =" Some Text box " Height="200"></TextBox>
                </telerik:RadExpander>
            </StackPanel>
        </telerik:RadExpander>
    </telerik:RadExpander>
</telerik:RadExpander>

(Other stack panels and placeholders are ommited for brevity)

In my examples above, My six level "C" items (1C;2C...6C) may require some 1200px of space, but the overall area available to the root expander "Test Expander 1" might only be 400 px within its parent host control. I need the "Test Expander 1" control to provide the scrollbar for the entire expander and not at the levels A, B or C.

I hope this makes sense and you can offer a suggestion... K.I.S.S. please... I don't want swathes of templates and other stuff going on if we can avoid it. If a template is required for 1 level then great, but we need to "Keep It Simple Sxxxxx" ;-)

Thanks in advance of your assistance.

1 Answer, 1 is accepted

Sort by
0
Paul
Top achievements
Rank 1
answered on 22 Jul 2011, 09:45 AM
OK,

It pays to Google a bit more.
The solution is simple using a ScrollViewer. D'oh !

Paul.
Tags
Expander
Asked by
Paul
Top achievements
Rank 1
Answers by
Paul
Top achievements
Rank 1
Share this question
or