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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:39:14+00:00 2026-05-24T06:39:14+00:00

I have question how i can bind datagrid column to collection? dataGrid1.Columns.Add(new DataGridTemplateColumn {

  • 0

I have question how i can bind datagrid column to collection?

 dataGrid1.Columns.Add(new DataGridTemplateColumn { Header="d", Binding = "RoomNumber"}); 

binding does not exsists what can i use to bind?

it work perfectly but i need to bind it with code behind

 <DataGridTextColumn Header="Room Number" Binding="{Binding RoomNumber}"/>
  • 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-24T06:39:15+00:00Added an answer on May 24, 2026 at 6:39 am

    As far as i understand you want to add data grid column from code behind and that column should work with binding..?

    here is sample snippet to add datagrid column from code behind

     var col = new DataGridTextColumn();
                col.Header = "d";
                col.Binding = new Binding("RoomNumber");
                dataGrid1.Columns.Add(col);
    

    With this approach you can add as many columns as you want and you can give data binding at run time for each column and you can specify itemssource at once….

    make sure to mark AutoGenerateColumns=”False” in your data grid so that you can avoid unwanted columns get added from itemssource..

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

Sidebar

Related Questions

I have question regarding the SQLAlchemy. How can I add into my mapped class
I have a question regarding where bind variables can be used in a dynamic
this question can create a misunderstanding: I know I have to use CSS to
I have not been able to find any definitive answers to this question: Can
I have the following question about JPA: Can I save the order of the
I have a question about JSF and GET http request. How can I get
I have a question about a problem I'm struggling with. Hope you can bear
i have a question, been stuck for a while, i dont know how can
So, i have some question about xml Documents in Java. Can i get all
I have really basic question. How can I get form id by input element

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.