winForms
CSV を a に追加するのはDataGrid
非常に簡単でした。これを に追加しようとしていSilverlight
DataGrid
ます。これが私の試みです-これは3列を生成しますCapacity|Count|Items
-値が正しいことに注意してください83 | 83 | _各行。83 行ありますが、列はそれぞれ diff 値を持つ 23 である必要があります。ご覧いただきありがとうございます。賞金をお楽しみください。
コード:
Try
Dim ofd As New OpenFileDialog
If ofd.ShowDialog Then
If IO.File.Exists(ofd.File.FullName) Then
Dim srsCol As New List(Of List(Of String))
Using fs As IO.FileStream = ofd.File.OpenRead
Using sr As New IO.StreamReader(fs)
While Not sr.Peek = -1
srsCol.Add(New List(Of String)(sr.ReadLine.Split(","c).ToList))
End While
End Using
End Using
dgStaff.ItemsSource = srsCol
End If
End If
Catch ex As Exception
MessageBox.Show(ex.ToString)
End Try