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

The Archive Base Latest Questions

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

I am planning to show, or to say, dump a set of same objects

  • 0

I am planning to show, or to say, dump a set of same objects in my application to user.

I need a control that after adding data to it, changing the data in a specific cell and row can be done programmatically.

At the moment I am using a ListView and I have populated it with my object like this:

enter image description here

My object is like:

public class TestData
{
public string Name {get;set;}
public double Force {get;set;}
public double PreTriggerVolt {get;set;}
public double PreTriggerCurr {get;set;}
public double TriggerVolt {get;set;}
public double TriggerCurr {get;set;}
public double PostTriggerVolt {get;set;}
public double PostTriggerCurr {get;set;}
}

The Type column is hard coded by myself in the ListView 😛

I will have a lot of this in the table.

One of the problem is, sometimes, for example, after collecting the data, all or some of TriggerVolt values should be added/substracted by an offset value. You may say it is better to clear the ListView, do the changes in the object using a foreach or whatever, then recrate the ListView. But isn’t there a way to directly point out to a specific row-column? Forexample I would really like something that I can name a cell and call it later. someting like:
Cell[J6][PreTriggerVolt] == 0.01212 (just a general idea)

Another problem is sorting the data by name, greatness or … For example if I sort the Pin column, the row below actual pin name can be dominant. I mean the Force : -0.1 for example…then everything in my listview collapse!!! it will be a huge mess.

And a lot of other problems you may already know about ListView.

I want to know what is the best way to approach this goal.

Thanks.

  • 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:02:59+00:00Added an answer on May 26, 2026 at 10:02 pm

    Instead of building the listview you should look into binding the control directly to your model. Here is a good tutorial on Binding in WinForms. Depending on what you want to do with the data being shown a DataGrid may be a better option (especially if you want the user to be able to edit the data, even with custom controls – see this tutorial).

    After you have set the binding up you will need to implement the INotifyPropertyChanged interface on your model class to notify the binding framework that a property has changed.

    public class TestData:  INotifyPropertyChanged
    {
    private string _name;
    public string Name
    {
        get { return _name; }
        set
        {
            _name = value;
            this.NotifyPropertyChanged("Name");
        }
    }
    
    // I only included one property for simplicity.  You of course will need to do this
    // for every property in the test model
    
    public event PropertyChangedEventHandler PropertyChanged;
    
    private void NotifyPropertyChanged(string name)
    {
        if (PropertyChanged != null)
        {
            PropertyChanged(this, new PropertyChangedEventArgs(name));
        }
    }
    

    }

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

Sidebar

Related Questions

I was planning to use url routing for a Web Forms application. But, after
I'm planning on creating a game that contains a landscape with objects on it.
I'm planning to implement an Android application that requires a login screen. If the
I am planning to create an application in android which has following features Show
I'm planning on building an application that simplifies web design. I intent using Lazarus/FreePascal
I have a very data-centric application, written in Python / PyQt. I'm planning to
We have Data Mart DB with performance data which we need to show in
im planning to create a movie file that might have over 16,000 frames?i know
I'm planning to write a program in Ruby to analyse some data which has
I have Java Desktop application that displays some information in a JTable that contains

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.