B
Bruce Schechter
I have a DataGrid control that I populate by binding it to an ArrayList.
The ArrayList contains objects of a class I created with several public
properties exposed to populate the respective columns.
I have two questions regarding this DataGrid control:
1.) There is an automatically-generated column along the left-hand side of
the DataGrid which is apparently provided to enable row selection. It
contains a little triangle to mark the currently-selected row. How can I
control the width of that column? (I don't know if it is even called a
"column", but I don't know what else to call it.)
2.) I am doing all formatting programmatically by creating a
DataGridTableStyle then creating each column respectively via
DataGridTextBoxColumn objects, etc. Finally, this new TableStyle, ts, is
added via myDataGrid.TableStyles.Add(ts); Whereas I am able to set the
font for the Header in this scenario (ts.HeaderFont), I have not found a way
to set the font for normal rows? If I try to set the font via the
DataGrid.Font property (after the above DataGridTableStyle is set), my font
specification seems to be outright ignored. How should I do this?
Cheers, Bruce
The ArrayList contains objects of a class I created with several public
properties exposed to populate the respective columns.
I have two questions regarding this DataGrid control:
1.) There is an automatically-generated column along the left-hand side of
the DataGrid which is apparently provided to enable row selection. It
contains a little triangle to mark the currently-selected row. How can I
control the width of that column? (I don't know if it is even called a
"column", but I don't know what else to call it.)
2.) I am doing all formatting programmatically by creating a
DataGridTableStyle then creating each column respectively via
DataGridTextBoxColumn objects, etc. Finally, this new TableStyle, ts, is
added via myDataGrid.TableStyles.Add(ts); Whereas I am able to set the
font for the Header in this scenario (ts.HeaderFont), I have not found a way
to set the font for normal rows? If I try to set the font via the
DataGrid.Font property (after the above DataGridTableStyle is set), my font
specification seems to be outright ignored. How should I do this?
Cheers, Bruce