Overflow area

6 posts, 0 answers
  1. Kim
    Kim avatar
    47 posts
    Member since:
    Jul 2013

    Posted 21 Feb 2014 Link to this post

    Hi, I want to save the state of the page view and restore it when a user logs back in.

    I am trying to find out how to;

    1) inspect the pageviews and determine if they are a) in the overflow area and if so b) is their button visible or hidden.

    2) set the pageviews back to the state they were at in the overflow area and whether the button is hidden

    Thanks,



  2. Kim
    Kim avatar
    47 posts
    Member since:
    Jul 2013

    Posted 24 Feb 2014 in reply to Kim Link to this post


    I have made some progress but I am getting an "Object reference not set to an instance of an object." when i try to use outlookelement.UncheckItem,. All the objects are valid and the  OutlookElement_ItemUnchecked even fires. 

    i can use the exact sameobject and call the outlookelement.CheckItem without an error.

    Is this forum monitored?

    Help
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Kim
    Kim avatar
    47 posts
    Member since:
    Jul 2013

    Posted 25 Feb 2014 in reply to Kim Link to this post

    Hello? 
  5. George
    Admin
    George avatar
    500 posts

    Posted 26 Feb 2014 Link to this post

    Hi Kim,

    Thank you for writing.

    Yes, the forum is monitored and although we do not guarantee that forum posts will be answered (as per our forum rules) we usually address forum posts from our customers within 72 hours.

    As to your question at hand, you can get all hidden items as follows:
    pageView.ViewMode = PageViewMode.Outlook;
    RadPageViewOutlookElement outlookElement = pageView.ViewElement as RadPageViewOutlookElement;
    RadPageViewOutlookItem[] hiddenItems = outlookElement.GetHiddenItems();

    Now you can easily check which RadPageViewPage is visible and which is not:
    foreach (RadPageViewPage page in pageView.Pages)
    {
        bool visible = true;
        if (Array.IndexOf(hiddenItems, page) == -1)
        {
            visible = false;
        }
    }

    Do not hesitate to write back, should you have further questions.

    Regards,
    George
    Telerik
  6. Kim
    Kim avatar
    47 posts
    Member since:
    Jul 2013

    Posted 26 Feb 2014 in reply to George Link to this post

    Thank you George.

    1) What about the error I am receiving? I have everything else working but I can't manually UnCheck and Item as it throws an "Object reference not set to an instance of an object" error. If I call outlookelement.CheckItem with the same object it doesn't error.

    2) Is the only way to hide a page header is call the "DragGripDown" method?




  7. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 03 Mar 2014 Link to this post

    Hello Kim,

    Thank you for writing.

    I have tested the described approach, but such an exception did not appear on my end.
    Attached you can find the test application that I used. 

    It is a long shot, but it is possible that the code called is at a place where RadPageView was not initialized yet.  Please, try to move the code at point where the RadPageView are initialized - for example on Form's Load event. If that is not the case please, modify my test project on a way to replicate the experienced exception and get back to me with it, so I can investigate the reasons causing it and provide you with further assistance.

    I would like to confirm that the calling OutlookElement's DragGripDown method is correct and for the time being is only way to hide the outlook element.

    Thank you for your cooperation. I am looking forward to your reply.

    Regards,
    Peter
    Telerik
Back to Top
UI for WinForms is Visual Studio 2017 Ready