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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:46:35+00:00 2026-05-24T11:46:35+00:00

I am using a datagridview to show my own items in it as List(Of

  • 0

I am using a datagridview to show my own items in it as List(Of MyStuff) and it works quiete well. When my class is changing the content the DataGrid does not change. I need to do DataGrid1.Items.Refresh and the items becomes updates.

But now my list contains 700 items and the .Refresh methode takes about 15 seconds just because one item changed. I’ve searched for any “UpdateContent” or “RowUpdate” or “RefreshRow” but found nothing. How is the right way to update single Rows?

Private LCommand As New List(Of MyLogEntry)

Me.dgv.DataContext = Me.LCommand
        Me._LastUpdate = DateTime.MinValue
        Me._CurrentIndex = -1
        Call UpdateDgv()



Private Sub UpdateDgv()
    Application.Current.Dispatcher.Invoke(AsyncRefresh)
End Sub

    Private Sub RefreshDgvAsync()
    Try
        Me.dgv.SelectedIndex = Me._CurrentIndex
        Me.dgv.ScrollIntoView(Me.dgv.SelectedItem)
    Catch ex As Exception

    End Try

    If DateTime.Now.Subtract(Me._LastUpdate).TotalSeconds > 60 Then Me.dgv.Items.Refresh()
    Me._LastUpdate = DateTime.Now
End Sub
<DataGrid x:Name="dgv" Grid.Row="1" RowHeight="20" AutoGenerateColumns="False" Grid.Column="1" ItemsSource="{Binding}" CanUserAddRows="False" VerticalScrollBarVisibility="Auto"  ClipToBounds="True" GridLinesVisibility="Horizontal">
            <DataGrid.Columns>
                <DataGridTextColumn         Header="N°"         Binding="{Binding Index}"           Width="SizeToCells"     MinWidth="30" IsReadOnly="True" />
                <!--<DataGridCheckBoxColumn     Header="OK"         Binding="{Binding Successfully}"    Width="SizeToCells"     MinWidth="35" IsReadOnly="True"     Visibility="Collapsed"  />-->

                <DataGridTemplateColumn Header="State" IsReadOnly="True">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <Image x:Name="imgState" Source="{Binding StateImageUrl}" />
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>





                <DataGridTextColumn         Header="Logentry"      Binding="{Binding Title}"           Width="SizeToHeader"    MinWidth="80" IsReadOnly="True"  FontWeight="Bold"                    />
                <DataGridTextColumn         Header="Action" Binding="{Binding Description}"    Width="SizeToCells"     MinWidth="80" IsReadOnly="True"  FontSize="12"       />
                <DataGridCheckBoxColumn     Header="Available"  Binding="{Binding Necessary}"       Width="Auto"            MinWidth="35" IsReadOnly="True"                    />
                <DataGridTextColumn         Header="Log"        Binding="{Binding Log}"             Width="*"               MinWidth="50" IsReadOnly="False"  FontSize="8" Foreground="Gray"                />
            </DataGrid.Columns>
        </DataGrid>
  • 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-24T11:46:36+00:00Added an answer on May 24, 2026 at 11:46 am

    It is not very clear for me why do you need to refresh your items at all. If you need to observe log entries collection changes then use ObservableCollection<LogEntry>, if you need to update cells when something in LogEntry changes then make it observable by implementing INotifyPropertyChanged.
    When you call Refresh on underlying CollectionView all item containers are regenerated. And it takes a lot of time espacially when virtuallization is disabled.

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

Sidebar

Related Questions

I am building a table using the DataGridView where a user can select items
how can you dynamically add items to a combobox using the datagridview virtual mode?
I am using vb.net. I have a datagridview to show data. Since the datagridview
I am using a drop-down list in DataGridView control, but the problem is that
How can I show files and their path in DataGridView without using web page?
I am using datagridview and its datasource is a BindingList. But when I try
I am using a DataGridView control in a Windows Forms application. When a user
I'm using a DataGridView in my WinForms application. My main objective is to make
I am using a DataGridView in a UI because of how easy it is
I'm using a DataGridView in a WinForms project with the AutoSizeRowsMode set to AllCells.

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.