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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T03:50:06+00:00 2026-05-30T03:50:06+00:00

I already had this stuff working in another project but now it does not.

  • 0

I already had this stuff working in another project but now it does not.
I have no more idea why.

  1. Set DataGrid ItemsSource to {Binding}
  2. Create new List(of myclass)
  3. Create public list Dim MyList As New List(of myclass)
  4. Bind DataGrid.DataContext = MyList when Instance is created
  5. Set DataGrid Column definitions to some Items on the myclass properties

I added my first class on the list
MyList.Add(New myclass())
now, this item is visible. but after creating the instance and after the datagrid is visible, the rows do not update.
MyList.Add(New myclass()) and no second row is visible.

Only when doing
MyDataGrid1.Items.Refresh
the items are updated correctly.
But the List(of ) class already included the INotifyPropertyChanged interface as far as I understand.

Any ideas why it fails?

here some additional code

        <DataGrid.Columns>
            <DataGridTextColumn         Header="N°"                 Binding="{Binding Path=LineNumber, StringFormat='{}{0:000}'}"           Width="SizeToCells"     MinWidth="30" IsReadOnly="True"  />

            <DataGridTextColumn         Header="HEX"                Binding="{Binding HexText}"         Width="SizeToHeader"    MinWidth="80" IsReadOnly="True"  FontWeight="Bold"                    />
            <DataGridTextColumn         Header="TextNormalized"     Binding="{Binding Description}"     Width="*"     MinWidth="80" IsReadOnly="True"  FontSize="12"       />
        </DataGrid.Columns>
    </DataGrid>

Some codebehind:

 Private ListData As New List(Of clsHexRowData)

Instance:

Public Sub New()

    ' This call is required by the designer.
    InitializeComponent()

    Me.dgv.ItemsSource = Me.ListData
    Me.ListData.Clear()
    Dim item As New clsQueueItem
    item.FromString("Hallo")
    Me.AddItem(item)
End Sub

this is visible, but when adding new rows after initializing the page, the items are not updated and a dgv.Items.Refresh is needed which I don’t understand why.

  • 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-30T03:50:08+00:00Added an answer on May 30, 2026 at 3:50 am

    use ObservableCollection(of myclass) instead of list. you will see the changes when you add or remove items.

    EDIT

     //add
     Application.Current.Dispatcher.BeginInvoke((Action)(()=> { Me.ListData.Add(new Item());}))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Apologies if this was already asked but, I have had a look and can't
We've had this question already, but I want to narrow it down to already
This is actually related to another question I had that was already answered. That
I added a project, Project2, to my solution. It already had another project lets
Need some help with this problem in implementing with XSLT, I had already implemented
i already had 2008 express sql server but for some reason it came without
Glassfish had already been installed into Netbeans. But I forgot the password and username.
All, I've had an idea kicking around for a while now: Is there a
So I discovered that gcc already had a working implementation of std::atomic so I
I was using ANT to deploy my stuff to Tomcat. But I had trouble

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.