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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:46:06+00:00 2026-05-13T12:46:06+00:00

I have a DataGrid and a string[][] dataSource array as a source data for

  • 0

I have a DataGrid and a string[][] dataSource array as a source data for this DataGrid. I use following code to set binding:

dataGrid.ItemsSource = dataSource;

for (int i = 0; i < columns; i++)
{
    dataGrid.Columns.Add(new DataGridTextColumn
    {                        
        Binding = new Binding(string.Format("[{0}]", i))
     });
}

How can I update an information in a cell of DataGrid when value in string[i][j] was changed?

  • 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-13T12:46:06+00:00Added an answer on May 13, 2026 at 12:46 pm

    If the data item that you are binding to implemented INotifyPropertyChanged then the update would happen automatically, as the data item/collection would broadcast that a property had been changed, and the datagrid would automatically be updated without you having to do a thing (manual grid rebinds can be slow depending on the amount of data).

    So if you change the data structure that you are binding to from a string to something that implements INotifyPropertyChanged (even if you code up that data object yourself, which is easy to do), and set the grid to automatically generate columns, then all you will need to do is set the dataGrid.ItemSource property and update the individual data objects as necessary.

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

Sidebar

Related Questions

I have a data table. If I set the DataSource of a DataGrid to
I have datagrid whichs items source is domainDataSource. How i can refresh Domain data
I have Datagrid which is bound to my Database <WpfToolkit:DataGrid Name=DataGrid1 Grid.Row=1 ItemsSource={Binding Path=MainSearchBinding}
I have List<List<double>> with values and wpf datagrid. How can I set this as
Have following code: public interface ITest { string St1 { get; } } public
I have a datagrid and I want to set the value of a dropdownlist
I have a DataGrid in my wpf app <DataGrid Name=datagrid2 ItemSource={Binding} CanUserReorderColumns=False IsReadOnly=True SelectionMode=Single
I have data source and table that I can bind to my controls and
I have this datagrid which has columns with a NumericStepper as an itemEditor where
I feel like I'm missing something here, but I have this datagrid which when

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.