Understanding the DataGrid
and the ObservableCollection
In most cases you perform data-binding operations against .NET collections, even when fetching data from databases. WPF offers a different binding mechanism, such as user controls like the new DataGrid
, the ListView
, or the ListBox
; moreover you can bind specific data to single controls like TextBox
(for example when building master-details representations). In this book, which targets Visual Basic 2010 and .NET 4.0, you get an example of how to take advantage of the new DataGrid
control, which offers a convenient and fast way for tabular data. The goal of next example is binding a collection of objects to a DataGrid
allowing insert/update/delete operations onto the collection. First, add ...
Get Visual Basic® 2010 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.