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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:30:22+00:00 2026-05-13T11:30:22+00:00

I have an Employee class ( Id,Name,Age) with few objects. I am showing all

  • 0

I have an Employee class ( Id,Name,Age) with few objects. I am showing all the records in “Employee View” form using ListView control and allowing user to Add/Edit/Delete these records. And have separate Form to Add a new record or to edit an existing one.
(No database interaction, just have a List to persist these changes)

Now, I want to support this setup (Employee View => Add/Edit Employee) with a Customizable number of columns (by default, showing the columns as per fields in my Employee object). So that, if user wants to send in more information (like, DoB for example) then he should be able to add that column in ListView and Add/Edit Employee forms should show one appropriate control for each column ( example DateTimePicker for DoB) to add/edit a desired record.

Thanks in advance.

  • 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-13T11:30:22+00:00Added an answer on May 13, 2026 at 11:30 am

    From memory the standard WinForms ListView control does not provide built-in data-binding. I would suggest that you are better off using the DataGridView in bound mode. That will give you the functionality where fields in the data source automatically appear as columns in the DataGridView.

    The DataGridView also provides built-in editing of rows. This editing is “in-place” in the DataGridView itself, so this may not be ideal for certain types of applications. However you can disable in-place editing (using the ReadOnly and AllowUserToAddRows properties) and continue to display a separate add/edit form if required.

    In your add/edit form, a common way to do what you ask is to add controls dynamically to form according to the number of fields in the data source. This involves creating the controls in code, setting position and format properties and then passing them to Form.Controls.Add(). You can then populate these fields manually or possibly use Simple Data Binding.

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

Sidebar

Related Questions

I have two tables, one Company and one Employee: class Company(models.Model): name = models.CharField(max_length=60)
I have the following models class Person(models.Model): name = models.CharField(max_length=100) class Employee(Person): job =
I have Employee class, which has 3 properties, ID, Name, HireDate. var employees =
I have a Employee class with many attributes. One of the attributes is employeeId
I have class Employee which is something like this. class Emp { int EmpID;
I have employee as a base class with salaried and hourly employees as derived
I have Employee table and an Entity class for it, My task is such
I have written this clone method for when the parent of the Employee class
I have a user defined class, say import java.util.Calendar; public class Employee{ private String
I have the following: MODEL.PY LIST = (('Manager', 'Manager'),('Non-Manager', 'Non-Manager'),) class Employee(models.Model): fname =

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.