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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:54:57+00:00 2026-06-08T18:54:57+00:00

I am trying to bind a GridView to a collection, and I want to

  • 0

I am trying to bind a GridView to a collection, and I want to update GridView after the collection has been set.

The reason I don’t use ObservableCollection is that it will block UI if collection is large(more than 1000 items, and I want to show all items after all items has been added).
In metro style app, there is no BindingList class for C# use, so do I need to implement my own collection class? I tried to implement a class inherited IList and INotifyPropertyChanged.

I did something like this:

<GridView x:Name="ItemsGridView" ItemsSource="{Binding viewCollection}"/>

class MyBindingList<T> : IList<T>, INotifyPropertyChanged
{
    private List<Item> _viewCollection = new List<Item>();
    public List<Item> viewCollection 
    { get { return _viewCollection; } set { _viewCollection = value; } }
    public virtual event PropertyChangedEventHandler PropertyChanged;
    public void RaiseChanged()
    {
        this.PropertyChanged(this, new PropertyChangedEventArgs("viewCollection"));
    }
}
MyBindingList<Item> list = new MyBindingList<Item>();
ItemsGridView.DataContext = list;

can someone give me a suggestion? 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-06-08T18:54:59+00:00Added an answer on June 8, 2026 at 6:54 pm

    On your code, your GridView is binding it’s ItemsSource to viewCollection. The only thing you are missing why it is not notifying is the RaiseChanged() method.

      public List<Item> viewCollection 
    { get { return _viewCollection; } set { _viewCollection = value; RaiseChanged(); } }
    

    One more thing, I won’t suggest putting the string property on your RaiseChange method. It should be at least accepting a string property name and pass it in the PropertyChangedEventArgs.

    An ideal property that notifies/updates the UI Controls in XAML would look like this

    public List<Item> viewCollection 
        { get { return _viewCollection; } set { _viewCollection = value; NotifyPropertyChanged("viewCollection"); } }
    

    So assuming your gonna set your viewCollection somewhere in your ViewModel. It should update the GridView.

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

Sidebar

Related Questions

I have a ASP.net gridview that I am trying bind to. My DataSource has
I have this GridView that I'm trying to bind data to and I need
I'm trying to bind a customer ContentProvider to my activity that holds a GridView
I have a GridView on an ASP.NET page that I'm trying to bind to
I'm trying to use LINQ to bind the data in my GridView. In my
I've been unsuccessfully trying to bind a gridview through a web service, but nothing's
I'm trying to use an ObjectBindingSource to bind data to a gridview. The data
I'm trying to bind a gridview to a linq to sql query that's using
I'm trying to bind a combobox to a ObservableCollection.When the form is displayed the
I'm trying to bind a XAML ComboBox so that its list items are the

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.