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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T04:29:01+00:00 2026-05-21T04:29:01+00:00

Please excuse my noobiness. I’ve come over from Windows Forms so I can use

  • 0

Please excuse my noobiness.

I’ve come over from Windows Forms so I can use the awesome Fluent Ribbon Control Suite. And I am redoing an app for someone.

Basically, I need to be able to programmatically create new Columns and populate them with Items from a DB Query at runtime. And depending on which button was clicked, I will also need to Clear all items in the ListView and repopulate it with different Column names along with new items from another DB Query.

But I’m having a hard time trying to figure this out. I just don’t get it. The first thing I did, before looking online, was this (thinking and hoping it would be very similar to how Windows Forms does it):

GridViewColumn gvc = new GridViewColumn();
            gvc.Header = "hi baeltazor!";
            listView1.Items.Add(gvc);

But, I was wrong. What I tried to do there was create a column called “hi baeltazor!” and add it to the ListView. How can we populate a ListView with items and columns at runtime?

The only solutions I’ve seen have alot of XAML involved, and I don’t get how that works, because I can’t change XAML at runtime?

  • 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-21T04:29:02+00:00Added an answer on May 21, 2026 at 4:29 am
    <ListView x:Name="ListViewControl">
        <ListView.View>
            <GridView x:Name="GridViewControl"/>
        </ListView.View>
    </ListView>
    

    and in code behind,

    ListViewControl.ItemsSource = ItemsSourceObject;   //your query result 
    GridViewColumn column = new GridViewColumn();
    column.Header = "Name";
    column.DisplayMemberBinding = new Binding("Name");
    GridViewControl.Columns.Add(column);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ok, I'm an MVC newbie coming from a webforms background, so please excuse any
Please excuse my ignorance, but I have come across this term owner drawn listbox.
Just started learning to use the grid so please excuse me for the possibly
I'm not experiences with Windows API at all, so please excuse my ignorance. I
(please excuse that I didn't use aliases). I would like my query output to
Please excuse the vague title. If anyone has a suggestion, please let me know!
Please excuse my ignorance on the topic, as I am relatively new to Hibernate
I'm new to python, so please excuse what is probably a pretty dumb question.
Here's one I have always wondered about... Please excuse my naivety, but - How
Please excuse my noob-iness! I have a $string, and would like to see if

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.