473,597 Members | 2,459 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 EmployeeHoliday sDates
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
EmployeeDetails Class.EmployeeH olidaysDates))
Dim myHol As New EmployeeDetails Class.EmployeeH olidaysDates
Dim DTable As New DataTable
Dim DColumn As DataColumn
Dim DRow As DataRow

DColumn = New DataColumn()
DColumn.DataTyp e = System.Type.Get Type("System.St ring")
DColumn.ColumnN ame = "Name"
DTable.Columns. Add(DColumn)

DColumn = New DataColumn()
DColumn.DataTyp e = Type.GetType("S ystem.DateTime" )
DColumn.ColumnN ame = "StartDate"
DTable.Columns. Add(DColumn)

DColumn = New DataColumn()
DColumn.DataTyp e = Type.GetType("S ystem.DateTime" )
DColumn.ColumnN ame = "EndDate"
DTable.Columns. Add(DColumn)
For Each myHol In myHolidayList
DRow = DTable.NewRow
DRow("Name") = GetName(myHol.E mployeeNo)
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.DataSo urce = DView
PDSource.AllowP aging = True
PDSource.PageSi ze = RecordsPerPage
PDSource.Curren tPageIndex = CurrentPage - 1

Repeater1.DataS ource = PDSource
Repeater1.DataB ind()
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 910

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

Similar topics

2
2024
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 data fetch only takes 5 secs, why does paint and load take 40 secs in total.
16
3009
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 example dsParts.xsd and including that in the data tier. I then will create a class that looks like this Public Class CPart Inherits dsParts
1
5309
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 not happenm , i have no clue what the problem is I am attaching the error <font color='red' >
19
2217
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 applications without writing a single line of code!!!'. Personally, and I know I wasn't alone in this, I was always suspicious of this claim, because one invariably ended up writing huge amounts of code attempting to get the automagical thing to do...
0
2207
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 correctly, posting to the wrong forum, or committing some other sort of faux pas. My team is developing a Windows Forms application using VS 2005 with SQL Server 2005 on the back end and we're having a problem using ComboBoxes data bound to lookup...
6
2442
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 track down erroneous behaviour of your app if you can't see where the problem is... i mean it's realy hard to debug binding issues and it would be realy of help if i could somehow enable this during debug session.
14
14623
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 so I get the ObjectDataSource. No problem ..... ObjectDataSource src = .... //is ok i have it
2
1199
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 are very simple steps and I can't see where I am going wrong. Any help would be appreciated. The relevant code goes as follows; Binding controls
6
4581
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 works fine: Text='<%# Eval("Price", ApplicationContext.CurrencyFormat) %>'
2
4217
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 Binding setting, you can apply it to your WCF service via the "bindingConfiguration" attribute of each <endpoint> here is a simple WCF service configuration in web.config which demonstrate this:
0
7971
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7893
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8276
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8259
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6698
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5847
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5436
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3932
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1243
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.