this.dataGridView1.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCellsExceptHeaders; //自动调动datagridview的行高度
this.dataGridView1.AutoSizeColumnsMode=DataGridViewAutoSizeColumnMode.AllCellsExceptHeader;//自动调动datagrid死的宽度
this.DataGridView1.DefaultCellStyle.WrapMode =DataGridViewTriState.True;//设置datagridview字段显示部的内容;