锘??xml version="1.0" encoding="utf-8" standalone="yes"?>欧美精品中文字幕亚洲专区,97在线视频一区,97av视频在线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 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 五原县| 广南县| 南江县| 鄂尔多斯市| 疏附县| 长葛市| 海晏县| 大悟县| 甘谷县| 新乡县| 昌都县| 都安| 通州市| 大埔区| 交城县| 阿拉善盟| 喜德县| 长武县| 彭山县| 宕昌县| 靖边县| 平武县| 陕西省| 大新县| 嘉鱼县| 铁岭县| 聂拉木县| 松桃| 宣恩县| 大安市| 洪雅县| 洪洞县| 金川县| 柏乡县| 隆安县| 长治县| 新兴县| 华亭县| 杭锦后旗| 丰城市| 陆良县|