从 DataGridView 获取交替行状态

发布于 2024-08-03 20:00:54 字数 117 浏览 1 评论 0原文

如果我使用交替行颜色更改属于 datagridview 控件的 datagridviewrow 的背景色,并且我想以编程方式将其更改回来,我如何知道该行是正常行还是交替行,以便我知道要更改它的颜色回到?有我错过的房产吗?

if i change the backcolour of a datagridviewrow that belongs to a datagridview control using alternating row colours and i want to programatically change it back, how do i know if the row was a normal row or an alternating row so i know what colour to change it back to? is there a property i have missed?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

书间行客 2024-08-10 20:00:54

...意识到您可以简单地将样式设置回 rowcelldefaultstyle,它会为您完成艰苦的工作。

... realised you can simply set the style back to the rowcelldefaultstyle and it will do the hard work for you.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文