F
foldface
Hi
Taking the DataGrid as a table:
(1) I can access the <tr> attributes via
DataGrid1.HeaderStyle.Width = 301; // and similiar
(2) I can access the <td> attributes of the main body cells via
DataGridItem a = DataGrid1.Items[0];
a.Cells[0].Attributes.Add("width", "50");
or similiar
(3) I can access the body, i.e. between <td> and </td> of any cell
via ITemplate children
The problem is I want to access the top <td> attributes, i.e. those
in the header. Is there any way of doing that?
I also want to set the column widths dynamically of an empty DataGrid,
the above would enable me to accomplish that, is there any other way of
doing this.
NB web forms only. Have found lots of answers for windows forms
Ta
F
Taking the DataGrid as a table:
(1) I can access the <tr> attributes via
DataGrid1.HeaderStyle.Width = 301; // and similiar
(2) I can access the <td> attributes of the main body cells via
DataGridItem a = DataGrid1.Items[0];
a.Cells[0].Attributes.Add("width", "50");
or similiar
(3) I can access the body, i.e. between <td> and </td> of any cell
via ITemplate children
The problem is I want to access the top <td> attributes, i.e. those
in the header. Is there any way of doing that?
I also want to set the column widths dynamically of an empty DataGrid,
the above would enable me to accomplish that, is there any other way of
doing this.
NB web forms only. Have found lots of answers for windows forms
Ta
F