我需要遍历DataGrid(不是DataGridView)中的每一行,并单击按钮来更改每一行中的文本。这样做的目的是转换DataGrid中的每个选项。
我已经尝试过简单地重新加载它,但这在UI中没有任何区别,因此所有选项仍然看起来相同。
Private Sub subLoadReportList()
Try
If gCurrentStrLanguage Is Nothing OrElse gCurrentStrLanguage = "EN" Then
dgDefinedReport.ItemsSource = ActiveReports
dgDefinedReport.DisplayMemberPath = "Name_English"
dgDefinedReport.SelectedValuePath = "Defined_Report_ID"
Else
dgDefinedReport.ItemsSource = ActiveReports
dgDefinedReport.DisplayMemberPath = "Name_French"
dgDefinedReport.SelectedValuePath = "Defined_Report_ID"
End If
Catch ex As Exception
strError = ex.Message & vbCrLf & " IN: " & Me.GetType.FullName
Throw New LegalServicesException(ex)
Finally
If strError.Length() > 0 Then
modGlobalFunctions.DisplayErrorMsg(strError, strError)
strError = String.Empty
End If
End Try
End Sub