Posted on: 11/12/2014 5:22:13 AM | Views : 438

Hi
I tried to retrieve the insmairet  to a gridview using object datasource.But it is not displaying the result in grid view. But the values are displayed in listbox as mentioned in below code.I am trying to connect gridview with a class for the first time.Thanks
Public Function retrieve1()  
 Dim retobj As New box
 retobj.boxName = tb.Text
        insmairet = New boxCollect
        insmairet = insmairet.Retrieve(retobj)
        For Each obj As box In insmairet     
       ListBox1.Items.Add(obj.boxName & ", " & obj.boxaddr)
gridview1.databind
        Next
    End Function

Go to the complete details ...