Click here to Skip to main content
15,896,201 members
Articles / Programming Languages / XML

Using XML as datagridview Source

Rate me:
Please Sign up or sign in to vote.
4.09/5 (8 votes)
15 Jan 2009CPOL3 min read 99.2K   6.3K   28  
An article about linking datagridview with XML file
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class frmMain
    Inherits System.Windows.Forms.Form

    'Form overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()> _
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing AndAlso components IsNot Nothing Then
            components.Dispose()
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
        Me.DgvMstUser = New System.Windows.Forms.DataGridView
        Me.btnSave = New System.Windows.Forms.Button
        CType(Me.DgvMstUser, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()
        '
        'DgvMstUser
        '
        Me.DgvMstUser.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
        Me.DgvMstUser.Location = New System.Drawing.Point(12, 12)
        Me.DgvMstUser.Name = "DgvMstUser"
        Me.DgvMstUser.Size = New System.Drawing.Size(245, 172)
        Me.DgvMstUser.TabIndex = 0
        '
        'btnSave
        '
        Me.btnSave.Location = New System.Drawing.Point(12, 190)
        Me.btnSave.Name = "btnSave"
        Me.btnSave.Size = New System.Drawing.Size(245, 23)
        Me.btnSave.TabIndex = 1
        Me.btnSave.Text = "Save to XML"
        Me.btnSave.UseVisualStyleBackColor = True
        '
        'frmMain
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.ClientSize = New System.Drawing.Size(269, 222)
        Me.Controls.Add(Me.btnSave)
        Me.Controls.Add(Me.DgvMstUser)
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
        Me.MaximizeBox = False
        Me.Name = "frmMain"
        Me.Text = "User"
        CType(Me.DgvMstUser, System.ComponentModel.ISupportInitialize).EndInit()
        Me.ResumeLayout(False)

    End Sub
    Friend WithEvents DgvMstUser As System.Windows.Forms.DataGridView
    Friend WithEvents btnSave As System.Windows.Forms.Button

End Class

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Junior) PT. Televisi Transformasi Indonesia
Indonesia Indonesia
Indra Permana Rusli is a freshgraduate, has experience and knowledge in using multimedia softwares, developing website using PHP, and currently working using VB.NET in his company to develop ERP software.

Comments and Discussions