I have a simple Windows Forms application which binds a DataView to a ListBox. This DataView uses Linq to sort my DataTable by a specific column descending. My ListBox is then bound to the DataView. I then have a simple form to add data to the DataTable. When I add a DataRow to the DataTable it displays in the ListBox.
I'm curious as to whats going on behind the scenes... I've read:
A DataView object is a customized view of a single data table that may be filtered or sorted. A data view is the data "snapshot" used by complex-bound controls. You can simple- or complex-bind to the data within a data view, but be aware that you are binding to a fixed "picture" of the data rather than a clean, updating data source.
I would have thought that since the DataView is a "snapshot" it wouldn't have automatically updated. Does a DataView add an event to update when the underlying DataTable is modified? Don't get me wrong, this is how I want it to work, but is this always the case?