Check out for
AutoSizeRowsMode
dataGridView1.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.DisplayedCells;
Also set the following properties :
1. Set the
AutoSizeRowsMode to
AllCells
2.
DataGridView.DefaultCellStyle.WrapMode to
DataGridViewTriState.True
3. If it does'nt work then you can use :
<asp:GridView>
<RowStyle HorizontalAlign="Right" />
</asp:GridView>
(You can also Replace the horizontal alignment property)