protected virtual void InitializeRow (GridViewRow row, DataControlField[] fields)
{
DataControlCellType ctype;
bool accessibleHeader = false;
switch (row.RowType) {
case DataControlRowType.Header:
ctype = DataControlCellType.Header;
accessibleHeader = UseAccessibleHeader;
break;
case DataControlRowType.Footer:
ctype = DataControlCellType.Footer;
break;
default:
ctype = DataControlCellType.DataCell;
break;
}
for (int n=0; n<fields.Length; n++) {
DataControlField field = fields [n];
DataControlFieldCell cell;
if (((field is BoundField) && ((BoundField)field).DataField == RowHeaderColumn) || accessibleHeader)
cell = new DataControlFieldHeaderCell (field, accessibleHeader ? TableHeaderScope.Column : TableHeaderScope.Row);
else
cell = new DataControlFieldCell (field);
row.Cells.Add (cell);
field.InitializeCell (cell, ctype, row.RowState, row.RowIndex);
}
}