在Visual Basic語言中DataGridView是跟資料庫相關聯的元件
DataGridView可以將資料庫的資料列示出來,並且做修改
不過大家不曉得有沒有試過,不透過資料庫,來使用DataGridView做資料編輯
以下便是程式執行畫面,以及相關程式碼:
	引用:
	
	
		| 
			
				 
					作者: Form1.Designer.vb
					
				 
		 
[略] 
 
    Friend WithEvents DataGridView1 As System.Windows.Forms.DataGridView 
    Friend WithEvents ToolStrip1 As System.Windows.Forms.ToolStrip 
    Friend WithEvents ToolStripButton1 As System.Windows.Forms.ToolStripButton 
    Friend WithEvents ToolStripSeparator1 As System.Windows.Forms.ToolStripSeparator 
    Friend WithEvents ToolStripButton2 As System.Windows.Forms.ToolStripButton 
    Friend WithEvents ToolStripButton3 As System.Windows.Forms.ToolStripButton 
    Friend WithEvents ToolStripButton4 As System.Windows.Forms.ToolStripButton 
    Friend WithEvents ToolStripButton5 As System.Windows.Forms.ToolStripButton 
    Friend WithEvents Column1 As System.Windows.Forms.DataGridViewTextBoxColumn 
    Friend WithEvents Column2 As System.Windows.Forms.DataGridViewTextBoxColumn 
    Friend WithEvents Column3 As System.Windows.Forms.DataGridViewTextBoxColumn 
    Friend WithEvents ToolStripButton6 As System.Windows.Forms.ToolStripButton 
    Friend WithEvents StatusStrip1 As System.Windows.Forms.StatusStrip 
    Friend WithEvents ToolStripStatusLabel1 As System.Windows.Forms.ToolStripStatusLabel 
    Friend WithEvents ToolStripStatusLabel2 As System.Windows.Forms.ToolStripStatusLabel 
    Friend WithEvents ToolStripStatusLabel3 As System.Windows.Forms.ToolStripStatusLabel 
 
End Class 
			
		 |