Click here to Skip to main content
15,888,461 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using a datagridview control in visual studio 2015 with default settings (it's size is 620; 248), and i usually need to add several lines with values (there's about 6 columns), some of the values being sometimes near 100 characters, so sometimes the cells can get quite wide.

Usually i can scroll with arrow keys to the right without any problems, BUT i noticed that when the total amount of all columns size gets too high, it's still possible to move the selection to the right BUT the datagridview doesn't horizontally scroll anymore, altough according to cellenter events, the selection is being moved but hidden from view.

Is there any solution to this? I can post the code i am using, in case it's necessary.

What I have tried:

I tried to remove a few characters from the long cell, and after a certain threeshold (which is variable depending on the total width of the control and the other columns's width), it's again possible to scroll with arrow keys again! So there's indeed a connection between the total amount of width in all columns and the control size property. I also tried many AutoSizeMode modes but there's no change on this issue, some of them appear to work but it's just because the columns got thinner, which i don't want since i want the mode DisplayedCells. And finally, yeah i tried using google but i was unable to find someone with the precise same issue that i am having.
Posted
Updated 11-Nov-18 7:58am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900