问题很简单:如何把NumbericUpDown 放入DataGridView中??首先,我在网上看到了一篇文章:地址为:http://www.dotblogs.com.tw/puma/archive/2008/11/10/5943.aspx
该地址绝对不是病毒或者是其他木马网站什么的,由于实在是没法表述其过程,故强烈恳求大侠们点击该网址看一下,就明白了,谢谢了
然后我按照其原样做了一个:
过程如下:在Form上放了2个东西:一个DataGridView(将其绑定一个Access),又放了一个DateTimePicker。好了,开始抄袭程序(代码如下):
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 _134
{
    public partial class Form1 : Form
    {
        private bool _CheckChange = false;        public Form1()
        {
            InitializeComponent();
        }        private void Form1_Load(object sender, EventArgs e)
        {
            // TODO: 这行代码将数据加载到表“testDataSet.表1”中。您可以根据需要移动或删除它。
            this.表1TableAdapter.Fill(this.testDataSet.表1);
            //設定DateTimePicker的高度  
            this.dateTimePicker1.Height = this.dataGridView1.Height;  
        }  
        
        //將DateTimePicker控制項定位在DataGridView的Column上  
        private void dataGridView1_CellEnter(object sender, DataGridViewCellEventArgs e)  
        {  
            if (this.dataGridView1.Columns[e.ColumnIndex].HeaderText == "date")  
            {  
                Rectangle r = this.dataGridView1.GetCellDisplayRectangle(e.ColumnIndex, e.RowIndex, false);  
                r = this.dataGridView1.RectangleToScreen(r);  
                this.dateTimePicker1.Location = this.RectangleToClient(r).Location;  
                this.dateTimePicker1.Size = r.Size;  
                this._CheckChange = true;  
                this.dateTimePicker1.Text = this.dataGridView1.CurrentCell.Value.ToString();  
                this._CheckChange = false;  
                this.dateTimePicker1.Visible = true;  
            }  
            else 
            {  
                this.dateTimePicker1.Visible = false;  
            }        
        } 
 
        //改變Column的值  
        private void dateTimePicker1_ValueChanged(object sender, EventArgs e)  
        {  
            if (_CheckChange) return;  
            this.dataGridView1.CurrentCell.Value = this.dateTimePicker1.Text;  
        }        }
    }写好了没报错,运行:
发现:一点反应都没有,原来的DateTimePicker在什么地方它还是在什么地方,根本没有被加到DataGridView里的意思!!!!
请问是哪里错了吗??
或者说,我想把NumbericUpDown 放入DataGridView中(如上面的网页中的那样),该怎么写代码呢??我是新手,请不要讲什么理论,哪怕是最简单的理论我也听不懂,
请尽量给代码,直接使用!!!!!!!! 
小弟在此谢谢了