将datagridview行设置为在c#win中冻结。形成 [英] Setting datagridview rows to frozen in c# win. form

查看:139
本文介绍了将datagridview行设置为在c#win中冻结。形成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

示例i有40行,一次只能显示20行,其他行会进入滚动条。 如何将datagridview的最后一行设置为冻结?如果我将最后一行设置为冻结,则滚动条消失。如何解决这个问题?



提前谢谢

Example i have 40 rows and at a time only 20 rows can be displayed and other rows go in the scrollbar. How to set the last row of the datagridview as frozen? If i am setting the last row as frozen the scrollbar disappears. How to solve this?

Thanks in advance

推荐答案

根据回复在其中 [ ^ ]这是预期的行为。



但是有一个链接关于这篇文章的解决方案的CP文章和其他建议如何我可以在RowCount创建冻结数据网格 - 1 [ ^ ]



如果不这样做,请尝试使用文本框来模仿最后一行的外观或构建自定义控件
According to the response here[^] that is expected behaviour.

However there is a link to a CP article and other suggestions on the solutions to this post How can i create frozen datagridview at RowCount - 1[^]

Failing that, try using textboxes to mimic the appearance of the last "row" or build a custom control


这篇关于将datagridview行设置为在c#win中冻结。形成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆