Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6830245
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:35:42+00:00 2026-05-26T22:35:42+00:00

I have my Telerik RadPageView control (Q2 2011 SP1) setup as ViewMode Outlook in

  • 0

I have my Telerik RadPageView control (Q2 2011 SP1) setup as ViewMode “Outlook” in my winforms C# application. In my requirement, I have a limited space to display the control (about 600px of height). When the control has more than 5 pages added, the view panel (the open area above the page selectors) is made smaller and cuts off the content (yellow area in screen shots below). I would like to know if there is a way to enforce a minimum height on this area so that the control will automatically collapse page selectors it cannot fit in this confined space. I need about 300px of height for each page.

I have already tried setting the MinimumSize property on each RadPageViewPage. However, when I do this, the page view page “bleeds” over the top of the page selectors. I was expecting the grip (the draggable part of the control) to automatically resize to allow for this minimum height requirement.

Please see the screen shots from my sample application below:

Problem:

enter image description here

Desired:

enter image description here

Update:

I was able to create a function that programmatically adjusts the grip position when either the “Initialization” or “Resize” events fire. I realize I most likely will need to call this function when the selected page changes as well.

Anyway, here’s the snippet:

private void adjustPageViewGrip()
{
    RadPageViewOutlookElement viewElement = (RadPageViewOutlookElement)radPageView.ViewElement;
    int minHeight = 300;
    int itemHeight = radPageView.SelectedPage.Item.Size.Height;
    int selectedPageHeight = radPageView.SelectedPage.Height;

    if (selectedPageHeight < minHeight)
    {
        int hide = (int)Math.Ceiling((double)(minHeight - selectedPageHeight) / (double)itemHeight);
        if (hide > 0)
        {
            viewElement.HideItems(hide);
        }
    }
    else if ((selectedPageHeight + itemHeight) >= minHeight)
    {
        int show = (int)Math.Floor((double)(selectedPageHeight - minHeight) / (double)itemHeight);
        if (show > 0)
        {
            viewElement.ShowItems(show);
        }
    }
}

I am still curious whether or not I need this code. Can the control already do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T22:35:43+00:00Added an answer on May 26, 2026 at 10:35 pm

    I posted this same question on the Telerik forum and discovered that the control in fact does not support what I was asking above.

    In the end, I tweaked the function to calculate the heights needed rather than hard coding them. Once the heights are calculated, the function shows or hides the correct number of pages needed. The function is now being called by the OnLoad, Initialized, Resized, and SelectedPageChanged events in an extended class. I also made the OutlookViewOverflowGrip invisible by collapsing it and I rely on the new code to adjust its position for me.

    Here’s the code for the final results:

    /// <summary>
    /// Adjusts the position of the Outlook overflow grip.
    /// </summary>
    public void AdjustOutlookViewOverflowGrip()
    {
        if (ViewMode == PageViewMode.Outlook && SelectedPage != null)
        {
            // Fix rendering bug by hiding RadPageViewPage's that are not currently selected
            foreach (RadPageViewPage page in Pages)
            {
                if (page == SelectedPage)
                {
                    page.Show();
                }
                else
                {
                    page.Hide();
                }
            }
    
            // Elements from control
            RadPageViewOutlookElement outlookElement = (RadPageViewOutlookElement)ViewElement;
            OverflowItemsContainer overflowItemsContainer = (OverflowItemsContainer)GetChildAt(0).GetChildAt(4);
    
            // Selected page and item heights
            int selectedPageMinHeight = (SelectedPage.MinimumSize.Height > ContentMinimumHeight ? SelectedPage.MinimumSize.Height : contentMinimumHeight);
            int pageSelectorHeight = SelectedPage.Item.Size.Height;
    
            // Show or hide items
            if (pageSelectorHeight > 0 && selectedPageMinHeight > 0)
            {
                // Calculate content area height
                int contentAreaHeight =                 
                    (
                        Size.Height -
                        (
                            from element in ((RadPageViewOutlookElement)ViewElement).Children
                            where
                            (
                                element.Visibility != ElementVisibility.Collapsed
                                &&
                                (
                                    element is RadPageViewLabelElement
                                    || element is OutlookViewOverflowGrip
                                    || element is RadPageViewOutlookItem
                                    || element is OverflowItemsContainer
                                )
                            )
                            select element.Size.Height + element.Margin.Vertical
                        )
                        .Sum()
                    );
    
                if (contentAreaHeight < selectedPageMinHeight)
                {
                    // Factor in OverflowItemsContainer height if it's currently collapsed
                    int overflowItemsHeight = (overflowItemsContainer.Visibility == ElementVisibility.Collapsed ? overflowItemsContainer.Size.Height : 0);
    
                    // Not enough space available... hide items
                    int hide = (int)Math.Ceiling((double)(selectedPageMinHeight - contentAreaHeight + overflowItemsHeight) / (double)pageSelectorHeight);
                    if (hide > 0)
                    {
                        outlookElement.HideItems(hide);
                    }
                }
                else if (contentAreaHeight >= (selectedPageMinHeight + pageSelectorHeight))
                {
                    // More space available... show items
                    int show = (int)Math.Floor((double)(contentAreaHeight - selectedPageMinHeight) / (double)pageSelectorHeight);
                    if (show > 0)
                    {
                        outlookElement.ShowItems(show);
                    }
                }
            }
    
            // Set overflow container visiblity
            overflowItemsContainer.Visibility = (outlookElement.GetHiddenItems().Length > 0 ? ElementVisibility.Visible : ElementVisibility.Collapsed);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Telerik Grid which has a footer that needs to display column
I have a telerik radgrid-control on my page for showing a list of articles.
Recently i completed on mid level web application where i have used telerik controls,
I have a Telerik grid in my asp.net mvc application that looks something like:
I have a telerik grid, I want to display data as below ProductName Count
I am doing Web Forms C# application. I have telerik controls installed. I can
I have a telerik Gridview control I do drag and drop of rows correctly
I have the following XAML code as part of a custom control: <telerik:RadTreeView x:Name=treeModules>
I have loaded the telerik editor control on the Asp.net. But there are few
Currently using System.Web.UI.WebControls.FileUpload wrapped in our own control. We have licenses for Telerik. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.