日期:2014-05-18 浏览次数:21054 次
private void dataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e) { if (e.RowIndex > -1) { if (e.ColumnIndex == 0 || e.ColumnIndex == 1) e.CellStyle.Alignment = DataGridViewContentAlignment.MiddleRight; } }