REAL basic questions about grids

  • Thread starter Thread starter Michael Hesse
  • Start date Start date
M

Michael Hesse

I am trying my first .NET project. I want to use a grid to display some
data. It is not bound to a data source.

I am having trouble with very simple actions.

1) Do I use a data grid, a list box, or what?
2) If I use a data grid, how do I set the numer of rows and columns and put
text into a cell?

Thanks,

Michael
 
Michael Hesse said:
I am trying my first .NET project. I want to use a grid to display
some data. It is not bound to a data source.

I am having trouble with very simple actions.

1) Do I use a data grid, a list box, or what?

Depends on what you want to display and how it is to be displayed, whether
the user needs to change the data and so on. A listbox has no columns. A
listview can have columns and one column in a row can be edited. A Datagrid
is editable.
2) If I use a data grid, how do I set the numer of rows and columns
and put text into a cell?

You have to bind it to a data source.
 
* "Michael Hesse said:
I am trying my first .NET project. I want to use a grid to display some
data. It is not bound to a data source.

I am having trouble with very simple actions.

1) Do I use a data grid, a list box, or what?
2) If I use a data grid, how do I set the numer of rows and columns and put
text into a cell?

I would use a listview control with its 'View' property set to
'Details'.
 
Thanks for the reply. I'll try the listView for now and play around with
creating a data set and binding it later.
 
Back
Top