简体   繁体   English

在C#中将标题添加到DataGridView中的侧栏

[英]Add Titles to the Side Columns in DataGridView in C#

I am attempting to a create a excel-style grid in a C#/Visual Studio application that I am developing. 我正在尝试在正在开发的C#/ Visual Studio应用程序中创建一个excel样式的网格。 I am aware that you can dynamically add the titles to the DGV on the top row, but is it possible to add a title on the side columns, where the arrow and asterisk are on the image below: 我知道您可以将标题动态添加到DGV的第一行,但是可以在侧栏中添加标题,其中箭头和星号位于下图:

在此处输入图片说明

If this cannot be achieved with a DataGridView is there a similar element in Windows Forms or Wpf? 如果使用DataGridView无法做到这一点,则Windows Forms或Wpf中是否有类似的元素?

Any answers or engagement would be appreciated! 任何答案或参与将不胜感激!

Thanks 谢谢

In WPF it's DataGridRowHeader, an example of row number you can find in MSDN , 在WPF中,它是DataGridRowHeader,您可以在MSDN中找到行号的示例,

And in WinForms it's HeaderCell property of DataGridViewRow. 在WinForms中,它是DataGridViewRow的HeaderCell属性。 And again in MSDN we can see row number sample. 再次在MSDN中,我们可以看到行号示例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM