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 6573027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:04:49+00:00 2026-05-25T15:04:49+00:00

I have a TreeView and 2 ListView in my program. Please imagin the following

  • 0

I have a TreeView and 2 ListView in my program.

Please imagin the following picutre:

enter image description here

The first treeview is populated by some xml files. the text property of it is the filename (without ext) and its tag is the path to file.

If user clicks on any of the TreeNodes, the ListView on the middle will be filled with some data within the clicked xml file and if user clicks on them, the last ListView will also by filled by the data within that part of the xml file.

Now, my question is:
I already made a context menu for the last ListView so if user right clicks on an item, he/she can select that pin to add it to an ignor list. The problem is, I do not know how to make this ignor list, so if he/she goes to another file and do something else and when he/she comebacks to that TreeNode/ListView which he/she already added a “Pin” to ignor list (Here everything will regenrate again) that pin does not show in the list. (Note that I do not want to delete anything from the xml files!)

Please let me know if the question is not CLEAR!
enter image description here

  • 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-25T15:04:50+00:00Added an answer on May 25, 2026 at 3:04 pm

    One way to do it would be to create a class that can keep track of ignore information. Something along the lines of:

    public struct PinInformation
    {
         private readonly string testBatch;
         private readonly string vIGroup;
    
         public PinInformation(string testBatch, string vIGroup)
         {
              this.testBatch = testBatch;
              this.vIGroup = vIGroup;
         }
    
         public string TestBatch { get { return this.testBatch; } }
         public string VIGroup { get { return this.vIGroup; } }
    
         public override bool Equals(object o)
         {
              if (o == null) return false;
    
              PinInformation info = o as PinInformation;
    
              if (info == null)
              {
                   return false;
              }
              else
              {
                   return (this.testBatch == info.testBatch) && (this.vIGroup == info.vIGroup);
              } 
    
         }
    }
    

    You can then create a Dictionary<PinInformation, List<string>> object that keeps track of the elements that are ignored:

      var ignoreList = new Dictionary<PinInformation, List<string>>();
      ....
      void AddPinToIgnoreList(PinInformation info, string pin)
      {
            if (!ignoreList.ContainsKey(info)) //this is why we override Equals
            {
                 ignoreList.Add(info, new List<string>());
            }
    
            ignoreList[info].Add(pin);
      }
    
      void RemovePinFromIgnoreList(PinInformation info, string pin)
      {
            ignoreList[info].Remove(pin);
      }
    

    Now its simple to keep in sync the elements you are showing in your UI with the info stored in the ignore tracking system we’ve created.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a treeview which is in detail view. listview is populated with items
I have a StackPanel containing a StackPanel and some other items. The first StackPanel
My project has some MyObject and the MyObject have a property of List<MyObject> .
I have treeview and 2 imagelist first image list contains images only 42x42 and
I have a treeview-widget inside a ScrolledWindow , which is populated during runtime. I
I Have a treeView Already populated (in vb.net) and would Like to move all
I have a TreeView with binded ItemsSource. I want to select my root(first) node.
I have a TreeView and a ListView in my winforms application. The problem is
I have a WinForm with 2 ListView controls. The first listview is on the
can we have ExpandableListView inside ListView so that I can have group level first

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.