Jon,
Using a DataSet & DataTable is easier...
However! if you put your data in a collection that implements IBindingList
such as:
Public Class Data
End Class
Public Class DataCollection
Inherits CollectionBase
Implements System.ComponentModel.IBindingList
...
End Class
You can bind an instance of DataCollection to your DataGrid and it will be
sortable.
Rockford Lhotka's book "Expert One-On-One Visual Basic .NET Business
Objects" from A! Press, provides demonstrates how to implement IBindingList.
http://www.lhotka.net
Post if you would like other samples.
Hope this helps
Jay
"Jon" <Jo*@discussions.microsoft.com> wrote in message
news:53**********************************@microsof t.com...
My application needs to present data generated at run time in a datagrid
that
can be sorted by clicking on columns, and where rows can be selected and
events generated.
Do I need to set up a dataset and datatable to do this or can I do this
through arrays (which I believe can not be sorted in a datagrid)?
Can anyone point me towards any samples or in the right direction?
thanks much - Jon