锘??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 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 焦作市| 子洲县| 开封县| 东丽区| 西林县| 芦溪县| 蓬安县| 罗田县| 大同市| 桂林市| 图木舒克市| 黑水县| 烟台市| 湾仔区| 古浪县| 壶关县| 杭州市| 武夷山市| 平武县| 噶尔县| 水城县| 嵩明县| 旺苍县| 永定县| 集贤县| 阳城县| 丰原市| 东源县| 昌乐县| 涿州市| 贺州市| 苍山县| 英超| 平南县| 台安县| 青川县| 柏乡县| 兰考县| 洪湖市| 木里| 昌图县|