Link to home
Start Free TrialLog in
Avatar of developer2012
developer2012

asked on

listview just displaying four items

Hi,

I have a listview which should be displaying all the records from the database.  But it keeps displaying only 4 records that too recently added. it ignores all the previous items.  Any idea how to resolve this?

HEre is the code for it.
  Try
         
            If d.ditems.Count > 0 Then


             
                Dim foo As String
                Dim foo1() As String
                Dim item As ListViewItem
                lvfoo.Items.Clear()
                'For Each foo In d.ditems
         
                    foo1 = foo.Split("|")
                    item = New ListViewItem(foo(0))
                    Me..Items.Add(item)
                    item.SubItems.Add(foo(1))
                    item.SubItems.Addfoo(2))

                    'item = Nothing
                Next
            End If
        Catch ex As Exception
            SystemException(ex.ToString)
        End Try

Open in new window

Avatar of PagodNaUtak
PagodNaUtak
Flag of Philippines image

Hi,

Can you check the value of d.ditems.Count? How do you populate the items in d.ditems.count?
Avatar of developer2012
developer2012

ASKER

I am populating the values from database.
ASKER CERTIFIED SOLUTION
Avatar of Meir Rivkin
Meir Rivkin
Flag of Israel 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
Can you show us the code on how you populate the d.ditems?
Fixed.