Here you go.
I tweaked the implementation that I previously described to make it (a little) more generic. The main drawback to the code I described is the need to create a special row class for any array. Until I get a chance to play with the Reflection API a bit I won't be able to...
Unfortunately, I don't think there's a way to directly bind a DataGrid to a multi-dimensional array. In VS2005, the DataGridView control's DataSource property only accepts objects that implement the following interfaces:
IList
IListSource
IBindingList
IBindingListView
Array does...
If you used Visual Studio to create strongly-typed DataSets, the actual implementation of what you need isn't too hard.
When you add your first DataGridView control to the grid to the control, Visual Studio (at least VS 2005) prompts you to select a data source for the grid. At that point...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.