锘??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();
        }



        
private   void  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 " ));
        }



        
private   void  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();
        }


    }

}


Robin's Java World 2009-01-03 22:40 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 神农架林区| 武陟县| 元氏县| 阜城县| 长阳| 八宿县| 东海县| 达日县| 孝义市| 渑池县| 佳木斯市| 乳山市| 兰考县| 呼玛县| 永嘉县| 洪洞县| 广灵县| 山阴县| 乌苏市| 泸州市| 寿宁县| 芷江| 菏泽市| 科尔| 蕲春县| 焉耆| 平顶山市| 内黄县| 贺兰县| 买车| 罗源县| 武胜县| 宁武县| 固始县| 于田县| 延川县| 河北区| 大连市| 无锡市| 新民市| 关岭|