迭代datagrid WPF

时间:2017-07-31 08:13:34

标签: wpf vb.net

我的vb.net/wpf应用程序中有一个datagrid,我这样创建:

Dim c1 As New DataGridTextColumn()
c1.Header = "Sifra"
c1.Width = 60
c1.Binding = New Binding("Sifra")
gridRacunNew.Columns.Add(c1)

Dim c2 As New DataGridTextColumn()
c2.Header = "Naziv artikla"
c2.Width = 500
c2.Binding = New Binding("Naziv")
gridRacunNew.Columns.Add(c2)

Dim c3 As New DataGridTextColumn()
c3.Header = "Količina"
c3.Width = 50
c3.Binding = New Binding("Kolicina")
gridRacunNew.Columns.Add(c3)

Dim c4 As New DataGridTextColumn()
c4.Header = "Cijena"
c4.Width = 100
c4.Binding = New Binding("Cijena")
gridRacunNew.Columns.Add(c4)

Dim c5 As New DataGridTextColumn()
c5.Header = "Rabat"
c5.Width = 50
c5.Binding = New Binding("Rabat")
gridRacunNew.Columns.Add(c5)

Dim c6 As New DataGridTextColumn()
c6.Header = "PC"
c6.Width = 100
c6.Binding = New Binding("PC")
gridRacunNew.Columns.Add(c6)

Dim c7 As New DataGridTextColumn()
c7.Header = "Iznos"
c7.Width = 100
c7.Binding = New Binding("Iznos")
gridRacunNew.Columns.Add(c7)

在我向该数据网格添加项目之后,我希望获得每一行的特定列值,即:我想sumarize" Iznos"为每个sifra'提供价值和做法。如果我尝试像datagrid.rows那样的IDE会告诉我' rows'不是datagrid的成员

0 个答案:

没有答案