使细胞可见DataGridView WinForms C# [英] Make cells visible DataGridView WinForms C#

查看:74
本文介绍了使细胞可见DataGridView WinForms C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法让一些细胞在 DataGridView 中不可见?

Is there any way to make some cells invisible in a DataGridView ?

基本上我正在发一张发票当使用特定设置时某些单元格没有意义的应用程序。
我目前使这些单元格ReadOnly没有任何价值,但如果它们变得不可见/透明,它将会很酷。

Basically I am making an invoice application in which certain cells have no meaning when a particular setting is used. I have currently made those cells ReadOnly with no value but it will be cool if they could become invisible/transparent.

任何免费的第三方控件也将

Any free 3rd party Control will also do !

推荐答案

Akshay,想一想,隐藏网格/表格中的单元格意味着什么?

Akshay, think a moment, what does it mean to hide a cell in a grid/table?

你可以最终添加一个行或列,有点像excel允许你做,但一个单元格,预期的行为是什么?

you "could" add a whole row or column eventually, a bit like excel allows you to do, but a single cell, what is the expected behaviour?

仍然会在该位置呈现矩形,白色或白色的黑色或任何其他背/面颜色的组合,您仍然会看到至少一个孔网格。

having a cell set as invisible will still render a rectangle in that location, white over white or black over whatever other combination of back/fore ground colors, you will still see at least a "hole" in the grid.

我不知道有什么具体的方法来做任何网格,将单元格设置为只读,清除内容应该有足够的帮助,如果你真的需要其他的东西,最终你的网格不是很好的思考,你正在做的,也应该有更少的行或列或应该b e在页面中有多个较小的网格已更改。

I don't know a specific way to do it with any grid, setting the cell as read only and clearing the content should help enough, if you really need other things eventually your grid is not well thought for the use you are doing of it, aka should have less rows or columns or should be changed in having multiple smaller grids in the page.

这篇关于使细胞可见DataGridView WinForms C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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