如何使用csharp从数据网格视图中隐藏partiuclar列名称 [英] How to hid the partiuclar column name from data grid view using csharp
本文介绍了如何使用csharp从数据网格视图中隐藏partiuclar列名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
输出如下;
我想使用c sharp从数据网格视图中隐藏特定的列名。
运行时输出。
日期RK VK GS VB CMK UNNI。
从以上输出如何隐藏数据网格视图中的partiuclar列,
请帮忙我。发送代码。
Output as follows;
I want to hide the particular column name from data grid view using c sharp.
output in run time .
Date Period RK VK GS VB CMK UNNI.
from this above output how to hide the partiuclar column from data grid view,
please help me. send the code.
推荐答案
您可以使用以下方法轻松隐藏DataGridView中的特定列:
You can easily hide the particular column in DataGridView using:
dataGridView.Columns["ColumnName"].Visible = false;
如果想让它再次可见,请更改属性Visible = true;
If want to make it visible again change the property Visible=true;
你可以这样试试
Hi,
you can try like this
GridView1.DataBind();
if (GridView1.Columns.Count > 0)
GridView1.Columns["ColumnName"].Visible = false;
谢谢
Thanks
这篇关于如何使用csharp从数据网格视图中隐藏partiuclar列名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文