ObjectDataSource queston (posted else where Sorry it was a mistake

G

Guest

I have something that works, but it only returns one row of data when i
create an ObjectDataSource with it and bind it to a gridview so i need a
little help with this (thanks)

as simple as it gets
1. my class:
Imports Microsoft.VisualBasic
Public Class radioShowFiles
Private _szFileName As String
Public Property szFileName() As String
Get
Return _szFileName
End Get
Set(ByVal value As String)
_szFileName = value
End Set
End Property
End Class
2.
the functions that allows it to bind:
Public Function fn_getallRadioShows() As DirectoryInfo
Dim ri As System.IO.DirectoryInfo = New
System.IO.DirectoryInfo("c:\websites\arlnewlook\radioshows")
Return ri
End Function
Function fn_rtn() As radioShowFiles
Dim rsf As radioShowFiles = New radioShowFiles
Dim ri As DirectoryInfo = Me.fn_getallRadioShows
Dim diar1 As IO.FileInfo() = ri.GetFiles()
Dim dra As IO.FileInfo
For Each dra In diar1
rsf.szFileName = dra.Name
Next
Return rsf
End Function
End Class
I know why it's only including the last row of data, but i am sorry to say i
don't know what to do to change it! I know i'm very close.
THANKS!
KES
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top