Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
向下滚动网格时,是否可以使DataGridView列标题与其他行一起滚动到视图之外?即不要让它们始终可见?
DataGridView
是否有DataGridView允许这样做的属性?
我不知道您可以设置任何设计时属性,但也许您可以做这样的事情?(未经测试,不确定它的性能如何。)
private void dataGridView1_Scroll(object sender, ScrollEventArgs e) { if (e.ScrollOrientation == ScrollOrientation.VerticalScroll) dataGridView1.ColumnHeadersVisible = (e.NewValue == 0); }