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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:25:15+00:00 2026-05-24T03:25:15+00:00

Can anyone point me to a very simple example(C#4.0) of a WPF Datagrid thats

  • 0

Can anyone point me to a very simple example(C#4.0) of a WPF Datagrid thats bound to a SQL table. I’d really like the simplist example possible. I want to be able to add, edit and delete rows. Thanks.

  • 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-24T03:25:16+00:00Added an answer on May 24, 2026 at 3:25 am

    Seems like an old thread, but hopefully this will still be useful. If you can get your data into an ObservableCollection, then most of the hard stuff will be done for you. From there you can just do something like this:

    ObservableCollection<Items> ocItems = new ObservableCollection<Items>();
    ocItems.Add(new Items());
    
    dgGrid.ItemsSource = ocItems;
    

    or, if you want to do it in XAML, you can do something like this:

    <DataGrid Name="dgGrid" ItemsSource="{Binding ocItems, Mode=TwoWay}" AutoGenerateColumns="True" />
    

    and then make sure you have an object called ocItems in your code.

    By using an ObservableCollection, you get add and delete updates automatically for you so you don’t have to tell the DataGrid to update. By using twoway binding, you get any editing that has been done taken care of for you as well. You can customize the look of the DataGrid with the DataGridColumns items, but I’ll let you look that up yourself.

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

Sidebar

Related Questions

Can Anyone point Me in the direction of how to tell when, for example,
Can anyone point me at an example of a customized Google Chrome Frame install
Can anyone point me to an example on how to use CURRENT_DATE in a
Can anyone point me toward a Go library that will give me the ability
Can anyone point me to some documentation about how I can use an Iso
can anyone point to a site or describe how I can go about designing
Can anyone point me at a decent repository or dependency injection library for any
can anyone point me in the direction of a good tutorial on how makefiles
Can anyone point me towards a ready made RSS screen scraper, preferably in Python
Can anyone point me in the right direction on how I would minimize ambient

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.