This code snippet populates a datagridview control using array objects.





This code snippet populates a datagridview control using array objects.
Tags: datagridview
Code Snippet:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
DataGridView1.Columns.Add("FirstName", "First Name")
DataGridView1.Columns.Add("LastName", "Last Name")
DataGridView1.Columns.Add("Email", "Email")
Dim Row1(2) As Object
Row1(0) = "John"
Row1(1) = "Doe"
Row1(2) = "john.doe@mailxyz.com"
Dim Row2(2) As Object
Row2(0) = "Suzan"
Row2(1) = "Smith"
Row2(2) = "suzan.smith@mailxyz.com"
Dim Row3(2) As Object
Row3(0) = "Tom"
Row3(1) = "Baker"
Row3(2) = "tom.baker@mailxyz.com"
DataGridView1.Rows.Add(Row1)
DataGridView1.Rows.Add(Row2)
DataGridView1.Rows.Add(Row3)
End Sub ActionScript - ActionScript 3 - Apache - AppleScript - ASP - Assembler - Bash - C - C# - C++ - ColdFusion - CSS - Delphi - DOS Batch - Fortran - HTML - iPhone - Java - JavaScript - jQuery - Lisp - MatLab - Maxscript - MXML - MySQL - Objective C - Other - Pascal - Perl - PHP - PL SQL - Prolog - Pseudocode - Python - Rails - SmallTalk - Smarty - SML - SPSS - SQL - SVN - Symfony - TCL - VB.NET - Visual Basic - XHTML - XML - XSLT
© 2000-2012 Xentrik.Net
