I can't seem to find what im looking for although i've searched around, i seem to find a lot of solutions to fit the datagridview to its form, but not the datagridview to its contents.
So basicall, i have a datagrid which displays data, the columns are set to autosize to fit the data, each user will fill different data into the columns therefore they will be different sizes resulting in a different sized datagrid each time
So how can i automatically resize the datagrid to fit its contents?
Thanks
Resizing DataGridView to fit its contents
Page 1 of 12 Replies - 798 Views - Last Post: 04 October 2012 - 10:40 AM
Replies To: Resizing DataGridView to fit its contents
#2
Re: Resizing DataGridView to fit its contents
Posted 04 October 2012 - 10:35 AM
Have you set the AutoSizeColumnsMode and/or AutoSizeRowsMode accordingly?
You can also set the WrapMode in the .DefaultCellStyle
You can also set the WrapMode in the .DefaultCellStyle
#3
Re: Resizing DataGridView to fit its contents
Posted 04 October 2012 - 10:40 AM
aha, i worked it out:
autosizecolumsmode = fill gives required results
this was previously set to columsheader rather than fill
thanks
autosizecolumsmode = fill gives required results
this was previously set to columsheader rather than fill
thanks
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|