资源简介

这篇文章(https://www.daboke.com)主要介绍了C#dataGridView控件的增删查改操作、自动生成序列号和末行显示等知识,并提供"仓库物料实时监控模拟"实例给大家进行学习参考。

资源截图

代码片段和文件信息

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 datagridview
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            this.textBox1.KeyDown += new KeyEventHandler(textBox1_KeyDown);//
        }

        System.Timers.Timer t = new System.Timers.Timer(2000);//实例化Timer类,设置间隔时间为2000毫秒;
        
        private void Form1_Load(object sender EventArgs e)
        {
            dataGridView1.AllowUserToAddRows = false;//不显示dataGridView1的最后一行空白              
            t.Elapsed += new System.Timers.ElapsedEventHandler(creatdata);//到达时间的时候执行事件;
            t.

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2020-04-02 11:40  datagridview\
     目录           0  2020-04-02 11:40  datagridview\.vs\
     目录           0  2020-04-02 11:40  datagridview\.vs\datagridview\
     目录           0  2020-04-02 11:40  datagridview\.vs\datagridview\v16\
     文件       22016  2020-04-02 19:02  datagridview\.vs\datagridview\v16\.suo
     目录           0  2020-04-02 11:40  datagridview\.vs\datagridview\v16\Server\
     目录           0  2020-04-02 19:02  datagridview\.vs\datagridview\v16\Server\sqlite3\
     文件           0  2020-04-02 11:40  datagridview\.vs\datagridview\v16\Server\sqlite3\db.lock
     文件      557056  2020-04-02 19:02  datagridview\.vs\datagridview\v16\Server\sqlite3\storage.ide
     目录           0  2020-04-02 19:00  datagridview\datagridview\
     目录           0  2020-04-02 11:40  datagridview\datagridview\bin\
     目录           0  2020-04-02 12:49  datagridview\datagridview\bin\Debug\
     文件       16384  2020-04-02 19:01  datagridview\datagridview\bin\Debug\datagridview.exe
     文件       36352  2020-04-02 19:01  datagridview\datagridview\bin\Debug\datagridview.pdb
     文件        3428  2020-04-02 11:42  datagridview\datagridview\datagridview.csproj
     文件        9805  2020-04-02 19:00  datagridview\datagridview\Form1.cs
     文件       11736  2020-04-02 17:43  datagridview\datagridview\Form1.Designer.cs
     文件        7289  2020-04-02 18:54  datagridview\datagridview\Form1.resx
     目录           0  2020-04-02 11:40  datagridview\datagridview\obj\
     目录           0  2020-04-02 19:01  datagridview\datagridview\obj\Debug\
     文件          42  2020-04-02 11:40  datagridview\datagridview\obj\Debug\datagridview.csproj.CoreCompileInputs.cache
     文件         991  2020-04-02 17:27  datagridview\datagridview\obj\Debug\datagridview.csproj.FileListAbsolute.txt
     文件        1012  2020-04-02 18:58  datagridview\datagridview\obj\Debug\datagridview.csproj.GenerateResource.cache
     文件         424  2020-04-02 19:01  datagridview\datagridview\obj\Debug\datagridview.csprojAssemblyReference.cache
     文件       16384  2020-04-02 19:01  datagridview\datagridview\obj\Debug\datagridview.exe
     文件         180  2020-04-02 18:58  datagridview\datagridview\obj\Debug\datagridview.Form1.resources
     文件       36352  2020-04-02 19:01  datagridview\datagridview\obj\Debug\datagridview.pdb
     文件         180  2020-04-02 12:49  datagridview\datagridview\obj\Debug\datagridview.Properties.Resources.resources
     文件         819  2020-04-02 11:40  datagridview\datagridview\obj\Debug\DesignTimeResolveAssemblyReferences.cache
     文件        6938  2020-04-02 11:40  datagridview\datagridview\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
     目录           0  2020-04-02 11:40  datagridview\datagridview\obj\Debug\TempPE\
............此处省略8个文件信息

评论

共有 条评论