Dim d1 As Byte =text1.Text Dim d2 As String = text2.Text Dim d3 As String = text3.Text Dim Row1() As String = {d1, d2, d3} 'ColumnCountプロパティで列を追加する場合の例 Me.auctionlist.ColumnCount = 3 Me.auctionlist.Columns(0).HeaderText = "管理番号" Me.auctionlist.Columns(1).HeaderText = "タイトル" Me.auctionlist.Columns(2).HeaderText = "商品説明" With Me.auctionlist.Rows .Add(Row1) End With
Private Sub hozonn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles hozonn.Click Dim dTbl As DataTable dTbl = DirectCast(auctionlist.DataSource, DataTable) dTbl.TableName = "商品リスト" dTbl.WriteXml("C:\temp\SampleData.xml") MessageBox.Show("SampleData.xmlに出力しました。", "通知") End Sub