DataGrid

  • Thread starter Thread starter Aaron
  • Start date Start date
A

Aaron

Why is there no reference out there (at least I can't find them) that
show the very basics of using a datagrid. All I want to do is set up
a grid with 2 columns, not bound to any data. Basically, how do I add
columns with headers, name them, and remove the record indicators?
The 'gotdotnet' references only show how to do this with bound data,
so no help to me.
 
Hi Aaron,

Here's how:

Click the TableStyles property in the Properties pane. This action displays
the DataGridTableStyle Collection Editor dialog box and automatically adds
a DataGridTableStyle to the TableStyles collection.

While still in that dialog box, click the ColumnGridStyle property. This
action displays the DataGridColumnStyle Colllection Editor dialog box and
automatically adds a DataGridTextBoxColumn to the GridColumnStyles
collection. Here is where you set the width and the name for the columns.

Click Add to add another DataGridTextBoxColumn for the 2nd column.

To turn of the row indicators, set RowHeadersVisible to False.

Hope this helps,

- Bruce R. Hamilton
..NET Compact Framework User Education
Microsoft


RowHeadersVisible
 
Back
Top