First inherit from DataGridViewRow (assume DataGridViewRowEx as class name), then after you have an instance of DataGridView assign the property RowTemplate to a new instance of DataGridViewRowEx:
dg.RowTemplate = new DataGridViewRowEx();
After that it should be ok, all rows added to the Rows collection will be of the same type as your inherited one (the Clone() method for DataGridViewRow create new rows of the same type as RowTemplate, see below).
public override object Clone()
{
DataGridViewRow row;
Type type = base.GetType();
if (type == rowType)
{
row = new DataGridViewRow();
}
else
{
row = (DataGridViewRow) Activator.CreateInstance(type);
}
if (row != null)
{
base.CloneInternal(row);
if (this.HasErrorText)
{
row.ErrorText = this.ErrorTextInternal;
}
if (base.HasHeaderCell)
{
row.HeaderCell = (DataGridViewRowHeaderCell) this.HeaderCell.Clone();
}
row.CloneCells(this);
}
return row;
}