AutoSize the LastColumn of Datagridview

Hi

I want to know that how can i make the last column of the datagridview

to adjust the width so that it covers all the space as datagridview

It means it gets fits to control canvas

I don't want to hardcode as the other columns can expand & shrink

So according to the space left

the last column gets autosize to cover the whole remaining space

(So,NO SIlver background of datagridview should be there)

thanks in advance




Answer this question

AutoSize the LastColumn of Datagridview

  • R.Nicholson

    Have you tried setting the last column’s AutoSizeMode to Fill

    -mark

    DataGridView Program Manager

    Microsoft

    This post is provided "as-is"


  • AutoSize the LastColumn of Datagridview