views:

515

answers:

1

Hi all,

in the DataGridView I want the cell size to expand according to the string length when I edit the cell. Excel does the same.

In the DataGridView, when entering edit mode, a DataGridViewTextBoxEditingControl is placed at the cell position. I tried to change the bounds/size of this control, but result is just a short flicker of my desired size. It gets directly overpainted the original, truncated way.

Any ideas on how to get this working?

Thanks,

Timo

A: 

Hi Timo.

Would you like the cell to resize as you type? Or would you like it to resize once the text is entered and enter is hit? The second option is by fair the easiest.

Let me know.

Thanks

lb