I am currently studying Linq to filtering data from Listview
for example , I have Listview table
I would like to get data which Emp Name is Rob BOB and Department is Developer
In order to make sure Linq is working, I was trying to find Rob BOB in listview table
I was trying
Dim Conflicts = From ListItem As ListViewItem In ListView1.Items
Select "Rob BOB" = ListItem.Text
and
Dim Conflicts As IEnumerable(Of ListView) = From item In ListView1.Items
Where item.SubItems(1).Text = "Rob BOB"
Select item.Text
For Each ConflictedGroup In Conflicts
MsgBox(ConflictedGroup.ToString)
Next
to get a data
However, it doesn't return anything or giving exception error
i was checking
How do I use LINQ to get all the Items that have a particular SubItem?
to follow how to use linq for Listview, but doesn't work ..
Does anybody know how to use Linq for Listview ?
thanks

