Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

Best way to create an edit form for List of objects

$
0
0

Hello, Im pretty new to this and I wonder about the best approach.

If I have an object, this object may contains other types of properties, like icons etc

   public class Host
    {
        public int id { get; set; }
        public String name { get; set; }
        public String hostName { get; set; }
        public Boolean ping { get; set; }
        public Boolean checkDnsService { get; set; }  
    }

and a list where I store them

List<Host> hosts = new List<Host>();

and I want to iterate them and make an edit form

 foreach(var host in hosts){
             }

What would be the best approach to do this?

I tried a listView, but I felt it was hard to control the colums if I wanted checkboxes etc so I skipped that.

I thought about a GridView, but maby its better to just create the controls programmaticly as I iterate the list.

Or maby its better to use some form of Databinding in Visual studio.

I'm not shure....

Regards


Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>