Auto sizing cell height on word wrap

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 6 years and 3 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
IanUoY
Posts: 91
Last visit: Wed Sep 20, 2023 2:44 am

Auto sizing cell height on word wrap

Post by IanUoY »

v5.4.145
64-bit

Ok, I cannot get cells with text displayed in a datagridview to increase the size of the cell to accommodate the text when word wrap set to true.
The really bizarre thing is that I have other forms where it does seem to work (and I cannot for the life of me see any difference in setup). It is a two columned datagridview with 1 column hidden.

Any help most appreciated.

Thanks
User avatar
IanUoY
Posts: 91
Last visit: Wed Sep 20, 2023 2:44 am

Re: Auto sizing cell height on word wrap

Post by IanUoY »

Managed to get working, by adding :

$dgvCourseRoutes.AutoResizeRows()

after I'd populated the rows.

Although I did not do this in the script for the previous form(s) which did work.

Ian
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: Auto sizing cell height on word wrap

Post by Alexander Riedel »

Moved to correct forum by moderator
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 6 years and 3 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked