在实践中,有时需要将表中数据隐藏。
属性:
获取或设置一个值,指示该列是否可见。
public override bool Visible { get; set; }
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Test_DataGridView
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
dataGridView1.DataSource = Source();
}
//数据表资源
private DataTable Source()