我想将lisviewitem中的guid数据传递给名为'GetPaymentLedgerByJobScheduleGUID'的函数,但是我收到以下错误。
listviewsubitem的值类型无法转换为system.guid
help -m read | less
有什么想法吗?
答案 0 :(得分:1)
您需要获取SubItem的Text属性并将其解析
Dim selectedGuidString As String = eachItem.SubItems(7).Text
Dim parseGuid As Guid
If Guid.TryParse(selectedGuidString, parseGuid) Then
Dim objPaymentLedgerData As PaymentLedgerData = GetPaymentLedgerByJobScheduleGUID(parseGuid)
End If