锘??xml version="1.0" encoding="utf-8" standalone="yes"?>欧美大片黄色,精品在线观看国产,精品亚洲一区二区三区在线观看http://www.aygfsteel.com/fastzch/category/37100.htmlI Love Java As My Life!zh-cnThu, 11 Mar 2010 17:03:44 GMTThu, 11 Mar 2010 17:03:44 GMT60C# Learning Trip (1) -- DataGrid Samplehttp://www.aygfsteel.com/fastzch/archive/2009/01/03/249650.htmlRobin's Java WorldRobin's Java WorldSat, 03 Jan 2009 14:40:00 GMThttp://www.aygfsteel.com/fastzch/archive/2009/01/03/249650.htmlhttp://www.aygfsteel.com/fastzch/comments/249650.htmlhttp://www.aygfsteel.com/fastzch/archive/2009/01/03/249650.html#Feedback0http://www.aygfsteel.com/fastzch/comments/commentRss/249650.htmlhttp://www.aygfsteel.com/fastzch/services/trackbacks/249650.htmlIt seems, the DataGrid component is a depreted component.
So I will try to use the DataGridView component.
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace CATS { public partial class QueryResumeForm : Form { private System.Data.DataTable dt =new System.Data.DataTable(); DataGrid dataGrid =new DataGrid(); public QueryResumeForm(CATS.CatsAppForm parent) { InitializeComponent(); this.MdiParent = parent; this.CreateTableStruct(); } privatevoid CreateTableStruct() { dt.Columns.Add("textbox1", System.Type.GetType("System.String")); dt.Columns.Add("textbox2", System.Type.GetType("System.String")); dt.Columns.Add("textbox3", System.Type.GetType("System.String")); } privatevoid queryButton_Click(object sender, EventArgs e) { System.Data.DataRow dr = dt.NewRow(); dr["textbox1"] ="a"; dr["textbox2"] ="bb"; dr["textbox3"] ="ccc"; dt.Rows.Add(dr); this.dataGrid.SetDataBinding(dt, ""); this.dataGrid.Parent =this; this.dataGrid.SetBounds(10, 50, 500, 300); this.dataGrid.Show(); } } }