You must Sign In to post a response.
  • Category: .NET

    How to Edit/Update Data in Collection in C#

    I have a Collection in my C# code

    private ObservableCollection<UserForms> _userForms = new ObservableCollection<UserForms>();
    public ObservableCollection<UserForms> UserForms { get { return _userForms; } }


    I am filling this in Form_Load()

    Now i want to update that Filled data collection
  • #692875
    If the property INotifyPropertyChanged is enabled for it then it will automatically update the value if you change any prioperty or else use the Collection Object.Update() command explicitly


    public class ObservableCollection<T> : Collection<T>,
    INotifyCollectionChanged, INotifyPropertyChanged

    Thanks & Regards
    Anil Kumar Pandey
    Microsoft MVP, DNS MVM

  • #692973
    Observable collection automatically notify to the objects it is bind to,so we don't to need to explicitly write any code to update to the object.

    Thanks & Regards


    Bunty


  • This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.