Link to home
Start Free TrialLog in
Avatar of Larry Brister
Larry BristerFlag for United States of America

asked on

Compare each item in grid selected items

In my attached code I want to look at each afsSourceDetail string coming in

If it doesn't = the same thing every time...exit the sub.

afs1
afs1
afs1

works

afs1
afs1
afs2
afs1

Exits sub.
For Each item As GridDataItem In grdAvailableForSale.SelectedItems
                    If item("afsSourceDetail").Text <> (previous afssourcedetail) Then
                        Exit Sub
                    Else

                    End If
                Next

Open in new window

Avatar of lludden
lludden
Flag of United States of America image

Dim Prev as String = grdAvailableForSale.SelectedItems.First.Text
For Each item As GridDataItem In grdAvailableForSale.SelectedItems
                    If item("afsSourceDetail").Text <> prev Then
                        Exit Sub
                    Else

                    End If
                Next
Avatar of Larry Brister

ASKER

lludden:
This is a Telerik RadGrid which doesn't have a ".First." method
ASKER CERTIFIED SOLUTION
Avatar of lludden
lludden
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Perfect...thanks