Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1365
layout changed flag
posted

Hi All,

i have a winform ui that starts up and loads layout from xml. The user can sort, resize, hide columns. when they do that i want to set a flag so that when the app closes it will say , "layout has changed do you want to keep the changes?" i'm not able to find where to set the flag.

can you help?

Parents
No Data
Reply
  • 29105
    Verified Answer
    Offline posted

    Hello Al,

    To properly keep track of the layout currently in use before, while, an after the end user is in session you can perform the following:

    ie. The following article will help you perform the commands needed below:
    http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=1036

    1. Save the grid's current layout to a memory stream immediately upon first use. (form's load event)
    2. Overwrite stream 1 (step 1) if you plan on loading any preexisting layout or expect your user's to load their own (eg. Open Dialog ==> choose existing layout)

    -- changes are then made by the end user

    3. Handle the close event of the form and create a second new stream (do not overwrite stream 1).
    4. Do a comparison on the closing event between the two streams based on the length in bytes. If any changes were made you could then proceed with your message and a popup, if necessary, MessageBox with buttons.YesNoCancel.

    Let me know if you have any questions regarding this matter.

Children