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

  • Home
  • SEARCH
  • 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 5993817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:43:46+00:00 2026-05-22T23:43:46+00:00

I am a programmer for winforms and asp.net. A new-comer to WPF application development.

  • 0

I am a programmer for winforms and asp.net. A new-comer to WPF application development.

I wish to thank in advance for any help rendered to my query,

I am working on a application for Banking. My job profile is to develop reusable usercontrols for the application.

An example would be to make a Simple numeric input box which has Max and Min number properties. So the control pops an error if the number entered is not within a range. (ofcourse there is much more to this control 🙂

On similar lines. I have to develop a listview user control with Two properties.

1) A comma separated values of column headers
2) A comma separated values of data to add

My colleague, now places this usercontrol on window (as known in WPF). and passes the above parameters to the listview control.

My coding ensures that the columns are placed and data is added. In winforms this is a simple process. In WPF i was able to achieve it for known columns by defining beforehand in observablecollection or otherwise using

SamplelistView.Items.Add(new { FirstName = "test1", LastName = "ABX", EmployeeNumber = "AAA111"});

However in the above mentioned command, Firstname,Lastname are previously known columns.

Is there any command like,adding data as a array or adding data directly to columns without binding to a collection. OR is there a way to add columns to observablecollections at runtime.

Pls. excuse my limited exposure on nomenclature and otherwise.

  • 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-22T23:43:47+00:00Added an answer on May 22, 2026 at 11:43 pm

    My approach to this problem would be:

    1. Create a UserControl that hosts a DataGrid
    2. Add a ColumnNames dependency property to the UserControl. In the PropertyChanged event handler, parse the CSV and update the DataGrid.Column accordingly.
    3. Add a Data dependency property to the UserControl – and when this changes, parse the CSV and add the data to the DataGrid.

    See this question for a few pointers:

    programmatically add column & rows to WPF Datagrid

    By the way, a CSV of column names is a horrible interface! Why not expose a List<string>, then add a TypeConverter so that you can use a CSV string in XAML?

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

Sidebar

Related Questions

Are there any 'good' resources for porting a VB.NET winforms application to C#? I'm
I'm ASP.NET programmer with no WinForms knowledge. I need to create a service that
I am a VB.net winforms programmer attempting to build an ASP.Net app. I use
The programmer is a C# ASp.NET Developer and is looking to learn his first
Good day (and happy New Year), I'm a beginner VB.Net programmer using VS 2008.
I have created a .NET C# WinForms application on Win 7 RTM x64, which
i'm ASP.NET programmer and have no experience in creating windows services. Service i need
As a hardcore WinForms programmer from a Win32 background I have always used Spy++
Im creating a C# Application based on WinForms / KryptonForms, and as the application
I'm a Winforms programmer before; I always partition programs I write in two parts,

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.