zoukankan      html  css  js  c++  java
  • DataTable Columns

    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 WindowsFormsTest
    {
        public partial class Form1 : Form
        {
            DataTable dt = new DataTable();
            public Form1()
            {
                InitializeComponent();

                dt.Columns.AddRange(
                     new DataColumn[]
                    {
                        new DataColumn("Id", typeof(int)),
                        new DataColumn("Name", typeof(string))
                    });
                dataGridView1.DataSource = dt;

            }

            private void Form1_Load(object sender, EventArgs e)
            {
                dt.Rows.Add(1, "AAAA");
                dt.Rows.Add(2, "BBBB");
            }
        }
    }

  • 相关阅读:
    二叉堆(最小堆, 最大堆)介绍与实现
    C++ 用变量定义数组
    C++ 用变量定义数组
    053185
    053184
    053183
    053182
    053181
    053180
    oracle prior
  • 原文地址:https://www.cnblogs.com/perock/p/2768067.html
Copyright © 2011-2022 走看看