DataGridview Issue with Scrollbars RRS feed

  • Question

  • I have seen this posted before, but have not found a solution that works for me.

    In a program I have I run queries against the Win32 class objects, from this I am adding rows to a datagridview but the scrollbars dissappear.

    All I am doing is using dgview.rows.add(value1, value2, value3)

    I have tried to suspendlayout and resumelayout, tried enable and disabled scrollbars but no matter what I do they do not reappear.

    I am mainly looking for a solution, even if its changing the way I am adding the data to the gridview. I am trying to stay away from a database as this runs against Win32_Class objects and is not storing data, just showing.

    Thank you for any help you may offer.

    Thursday, June 18, 2020 11:19 AM

All replies

  • Ryan,

    Put in top of your code Option Strict On. Avoiding this makes communicating with others difficult. 

    The only code which you show for instance has to be


    This code is not the reason your scrollbars disappear. 

    Probably there is more like that and with "Option Strict On" you are warned about that.

    Currently your program works the same like an VB6 program. There is tried to find what the programmer has meant and that goes often wrong. 

    It seems already 20 years that somehow at Microsoft they think that all VB.Net programmers are former VB6 programmers who did not learn anything else. 


    Thursday, June 18, 2020 11:48 AM
  • Cor, 

    I tried the above recommendation and still was unable to get the scrollbars to show, even tried dumping the data to a view and setting that to the data-source of the dgview.

    I appreciate the help, going to just dump the data to a table within an access database and refresh as needed.

    Thank you.

    Wednesday, June 24, 2020 3:19 PM
  • Hi Ryan Lashway,

    Thanks for your feedback.

    According to your description, I need more information to make a test.

    Could you provide some related code to reproduce your problem ? It will help us to analyze your problem.

    We are waiting for your update.

    Best Regards,

    Xingyu Zhao

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Thursday, June 25, 2020 7:02 AM