简体   繁体   中英

Cannot Add the Scroll Bar in Datagridview

I have problem with scroll bars in my datagridview. I try to set scroll bar, but it never showing. How can i add the scroll bars in my datagridview? This my images of datagridview, sorry i cant show the code.

在此处输入图片说明

You should set the ScrollBars property, like this:

dataGridView1.ScrollBars = ScrollBars.Both;

If it's already set correctly, check that:

dataGridView1.AutoSize = false;

Also make sure that none of the DataGridViewColumns have Frozen property set to true. Otherwise you won't get horizontal scroll bar.

DataGridViewColumn.Frozen = false

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM