Using a datagrid for something other than DB data

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi folks

I am doing a project that involves getting a list (subject to certain
criteria) of filenames of mp3 files and the corresponding play time.

I want to display that list (both the name and the play time) in separate
columns.

I was originally thinking in term of a datagrid control with 2 columns, but
it appears as though it is only suitable for DB data.

What I was wondering is, can a datagrid be used for the purpose I have in
mind? Or is there some other control that I could use?

Regards

Ross
 
Hi folks

I am doing a project that involves getting a list (subject to certain
criteria) of filenames of mp3 files and the corresponding play time.

I want to display that list (both the name and the play time) in separate
columns.

I was originally thinking in term of a datagrid control with 2 columns, but
it appears as though it is only suitable for DB data.

What I was wondering is, can a datagrid be used for the purpose I have in
mind? Or is there some other control that I could use?

If you're using .NET 2.0, then check out the new DataGridView. It's
much more powerful and easier to use (in my opinion) than the DataGrid.

If you're still using .NET 1.x, it might be easiest to just build an in-
memory DataTable and bind that to the DataGrid -- especially if you're
just displaying the data.
 
Back
Top