I have to convert windows form control to WPF. I want to know how to iterate through Datagrid in WPF.
For Each dr As DataGridViewRow In dtg.Rows
If dr.Cells("Name").Value.ToString.Trim <> String.Empty Then
row = dt.NewRow 'Create new row
For cn As Integer = 0 To TotalDatagridviewColumns
row.Item(cn) = IfNullObj(dr.Cells(cn).Value) ' This Will handle error datagridviewcell on NULL Values
Next
dt.Rows.Add(row)
End If
Next
I want the above mentioned to work in WPF DataGrid.