private void dataGridView1_DefaultValuesNeeded(object sender, DataGridViewRowEventArgs e)
{
int customersTypeID = getCustomerID();
e.Row.Cells["编号"].Value = customersTypeID;
}
using (SolidBrush b = new SolidBrush(dataGridView1.RowHeadersDefaultCellStyle.ForeColor))
{
e.Graphics.DrawString(e.RowIndex.ToString(System.Globalization.CultureInfo.CurrentUICulture), e.InheritedRowStyle.Font, b, e.RowBounds.Location.X + 20, e.RowBounds.Location.Y + 4);
}