Scrolling DataGridView per pixel

前端 未结 2 1288
南方客
南方客 2021-01-24 04:58

I am making a .NET 4 WinForms application which reads data from a database and displays rows in a DGV. However the number of rows is larger than maximum number of rows that can

2条回答
  •  失恋的感觉
    2021-01-24 05:43

    I have dropped the need for DGV and therefore for this kind of approach. I have created a FlowLayoutPanel with Panels created dynamically to display the required data, designed the way I wanted it to be.

    There is probably a way to perform smooth scrolling of DataGridView which could be accomplished by analyzing .NET reflection of DataGridView code, but again, I found an acceptable alternative and I'm using it.

    There is a way to accomplish smooth scrolling of DGV by actually placing it on a panel with a scrollbar. That way, scrolling a panel scrolls the DGV too. This way wasn't convenient for me because DGV headers would get scrolled out of screen and I needed them to be visible at all times.

提交回复
热议问题