C#datagridview文本样式?

编程入门 行业动态 更新时间:2024-10-17 02:58:46
本文介绍了C#datagridview文本样式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

------- No|Data ------- 1 |123 ------- 2 | 1 2 3 -------

它是在C#Winform上显示的DataGridView。 第一张唱片是通过HeidiSQL添加的。 第二个是通过DataGridView在C#Winform上的新行添加的。 我只想要第一个记录样式。 谁能告诉我是什么让第二种风格以及如何修复它? 提前致谢。 我尝试了什么: 我发现了一些东西,但还没有解决。

It's DataGridView displaying on C# Winform. First record was added via HeidiSQL. Second was added via DataGridView's new row on C# Winform. I just want the first record style. Can anyone tell me what makes second style and how I can fix it? Thanks in advance. What I have tried: I found something but it's not solved yet.

------- No|Data ------- 1 |123 ------- | -------

1.在第二行添加按键'abc'的新行。它看起来如下。

1. Add new row with keystroke 'abc' at second line. It looks like below.

------- No|Data ------- 1 |123 ------- 2 |abc -------

2.留下行 3.使用相同的数据编辑。

2. Leave row 3. Edit with same data.

------- No|Data ------- 1 |123 ------- 2 |abc -------

4.其他单元格也很好。

4. And it goes well on other cell.

------- No|Data ------- 1 |123 ------- 2 |abc ------- 3 |def -------

只有文本键才能生成此选项。数字键没有。 '1 2 3' - > '4 5 6' 这不是空白。 这让我很疯狂。

Only text key makes this. Number key doesn't. ' 1 2 3 ' -> ' 4 5 6 ' It's not a blank. This makes me crazy.

推荐答案

查看实际数据 - 它可能包含如果没有,那么你需要查看原始DataGridView行的创建方式,以及是否对它们应用了任何特殊样式,因为新行将继承默认行/列样式,而不是每行应用的任何自定义样式。 Look at the actual data - it's likely that it contains the spacing. If it doesn't, then you need to look at how the original DataGridView rows are created, and if any special styling was applied to them as the new row will inherit the default row / column style, not any custom style that has been applied on a "per row" basis.

更多推荐

C#datagridview文本样式?

本文发布于:2023-11-10 16:21:35,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1575875.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:样式   文本   datagridview

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!