Click here to Skip to main content
12,751,306 members (35,132 online)
Click here to Skip to main content


28 bookmarked
Posted 14 Jan 2009

Using XML as datagridview Source

, 15 Jan 2009 CPOL
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
        End If
    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.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
        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
        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.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
        Me.MaximizeBox = False
        Me.Name = "frmMain"
        Me.Text = "User"
        CType(Me.DgvMstUser, System.ComponentModel.ISupportInitialize).EndInit()

    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.


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


About the Author

Indra PR
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.

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170215.1 | Last Updated 15 Jan 2009
Article Copyright 2009 by Indra PR
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid