在 DataGridView 中选择一行并让行标题上的箭头跟随
这是在 C# 中。 如果我在 DataGridView 中使用 DataGridViewRow.Selected = true 选择一行,则该行选择得很好,但“列标题”(最左边的灰色列)中的箭头不会跟随。 我该如何设置呢?
另一个问题:如果我在设计器中将列格式设置为“居中”,列标题仍然保持左对齐。 如何将列标题设置为居中?
谢谢, 布莱恩
This is in C#. If I select a row in a DataGridView with DataGridViewRow.Selected = true, the row selects just fine, but the arrow in the "column header" (the grey very leftmost column) doesn't follow. How do I set that?
Another question: If I set a column format to "centered" in the designer, the column header is still left aligned. How do I set the column header to be centered too?
Thanks,
Brian
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这直接来自 google:
This is straight from google:
要回答问题的第二部分,请确保将列的标题样式也设置为居中。
To answer the second part of you question, make sure your setting the header style for the column to centered as well.