473,503 Members | 1,733 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Data Binding Issue

Hi All,

I have a databinding issue with one of my web forms. Basically I have
created a class, which has the following syntax:

Public Class EmployeeHolidaysDates
Private _EmployeeNo As Integer
Private _BeginDate As Date
Private _EndDate As Date
Private _Actual As Integer
Private _ID As Integer
Private _ManID As Integer
Public Property EmployeeNo() As Integer
Get
Return _EmployeeNo
End Get
Set(ByVal value As Integer)
_EmployeeNo = value
End Set
End Property
Public Property BeginDate() As Date
Get
Return _BeginDate
End Get
Set(ByVal value As Date)
_BeginDate = value
End Set
End Property
Public Property EndDate() As Date
Get
Return _EndDate
End Get
Set(ByVal value As Date)
_EndDate = value
End Set
End Property
Public Property Actual() As Double
Get
Return _Actual
End Get
Set(ByVal value As Double)
_Actual = value
End Set
End Property
Public Property ID() As Integer
Get
Return _ID
End Get
Set(ByVal value As Integer)
_ID = value
End Set
End Property
Public Property ManagerID() As Integer
Get
Return _ManID
End Get
Set(ByVal value As Integer)
_ManID = value
End Set
End Property
End Class

Basically I get a list of Employee Holiday dates from the DataBase and
store it in a List of the above class. I then pass this list to a sub to
create a DataTable to enable me to bind this data to a repeater control.
When I bind the data, the repeater shows the correct number of rows, but
no text data is shown and I have no idea why.
Below is my BuildData sub

Public Sub BuildData(ByVal myHolidayList As List(Of
EmployeeDetailsClass.EmployeeHolidaysDates))
Dim myHol As New EmployeeDetailsClass.EmployeeHolidaysDates
Dim DTable As New DataTable
Dim DColumn As DataColumn
Dim DRow As DataRow

DColumn = New DataColumn()
DColumn.DataType = System.Type.GetType("System.String")
DColumn.ColumnName = "Name"
DTable.Columns.Add(DColumn)

DColumn = New DataColumn()
DColumn.DataType = Type.GetType("System.DateTime")
DColumn.ColumnName = "StartDate"
DTable.Columns.Add(DColumn)

DColumn = New DataColumn()
DColumn.DataType = Type.GetType("System.DateTime")
DColumn.ColumnName = "EndDate"
DTable.Columns.Add(DColumn)
For Each myHol In myHolidayList
DRow = DTable.NewRow
DRow("Name") = GetName(myHol.EmployeeNo)
DRow("StartDate") = myHol.BeginDate.ToString
DTable.Rows.Add(DRow)
Next
Dim DView As New DataView(DTable)
DView.Sort = "Name"
Dim PDSource As New PagedDataSource()
PDSource.DataSource = DView
PDSource.AllowPaging = True
PDSource.PageSize = RecordsPerPage
PDSource.CurrentPageIndex = CurrentPage - 1

Repeater1.DataSource = PDSource
Repeater1.DataBind()
DView = Nothing
DTable = Nothing
End Sub

(I have ommitted some of the members for clarity)
If anyone could tell me why this is happening I would be most grateful.

Thanks
Dec 20 '06 #1
0 899

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2006
by: kk | last post by:
Have 2 problems, any help is appreciated. Tab with Grids -------------- BL - fetching data from DB ( 5 secs - 10 rows) Grid Laod - 20 secs Grid Paint on tab change - 20 secs Problem: The...
16
2986
by: D Witherspoon | last post by:
I am developing a Windows Forms application in VB.NET that will use .NET remoting to access the data tier classes. A very simple way I have come up with is by creating typed (.xsd) datasets. For...
1
5299
by: Sachin Kuchinad | last post by:
Hi All I am using .NET Framework version 1.0.3705 to build a website. Now i have made a webform and on that i have added a dropdown to the page I bind this listbox to a datareader . This does...
19
2206
by: Larry Lard | last post by:
In the old days (VB3 era), there was a thing called the Data Control, and you could use it to databind controls on forms to datasources, and so (as the marketing speak goes), 'create database...
0
2195
by: mjsterz | last post by:
I've been working with VB .NET for less than a year and this is the first time I've posted on one of these groups, so let me apologize beforehand if I'm being unclear, not posting my issue...
6
2430
by: Mikus Sleiners | last post by:
Is there any way to enable exception throws in VS 2005, that occur during binding operations? I am upset that i can't see exceptions that are thrown during binding operations. It's very hard to...
14
14602
by: Rolf Welskes | last post by:
Hello, I have an ObjectDataSource which has as business-object a simple array of strings. No problem. I have an own (custom) control to which I give the DataSourceId and in the custom-control...
2
1191
by: John | last post by:
Hi I have a small app with bound controls that do not seem to be copying across the data entered into them to the underlying row for the update. This one really has me stump even though these...
6
4574
by: Tomasz J | last post by:
Hello developers, I bind my TextBox control specyfying a format stored in my application global ApplicationContext object - it has a static string CurrencyFormat property. The problem - this...
2
4207
by: Steven Cheng | last post by:
Hi Gary, As for the setting you mentioned, it is used to custimze the received data size limitation of WCF binding(such as NetTcpBinding or HttpBinding). After you have definite a customized...
0
7087
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7281
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7334
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6993
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7462
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5579
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5014
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
383
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.