Grid Control in VB.NET

  • Thread starter Thread starter Bob
  • Start date Start date
B

Bob

Hi Everyone:

Does anyone know where I can find a free grid control that is used to
display information and is not tied to any databases? I basically read a
file, and want to display a matrix. Of course this is a small portion of
what I want to do. In VB 6.0, there was a control, but I could not find a
similar one in VB.NET. In VB.NET the grid must be hooked to a database.

Your help is appreciated.

Bob
 
You can use the native DataGridView if you do the following:

Create a DataTable with a column for each column in your matrix.

Add a row for each row in your matrix.

Set each dt(row)(col) to it's corresponding matrix cell value

Create a DataView from the DataTable, e.g.
Dim dv as New DataView(dt)

Bind the the view to the control, .e.g.

dgv.DataSource = dv

I know it seems like a lot to accomplish such a little. Maybe someone else
knows a better way!

Best Regards,
Len
 
Back
Top