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
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