Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I use checkbox in Datarepeater ?

Status
Not open for further replies.

SBh

Programmer
Jul 4, 2001
9
US
I want to put some checkbox in datarepeater and bind them with the field in database. In user control project, I code like this:
--------------------------------------------------------------------------------
Public Property Get Discontinued() As String
Discontinued = ChkDiscont.Value
End Property

Public Property Let Discontinued(ByVal newDiscontinued As String)
ChkDiscont.Value = newDiscontinued
PropertyChanged "Discontinued"
End Property

Private Sub ChkDiscont_Click()
PropertyChanged "Discontinued"
End Sub

--------------------------------------------------------------------------------
After creating my user control and setting the RepeatedControlName, I add RepeaterBinding objects as following :
-------------------------------------------------------------------------------
With Repeater
Set .DataSource = Adodc1
.RepeatedControlName = "ProductsCtl.ctlProducts"
.RepeaterBindings.Add "ProductName", "ProductName"
.RepeaterBindings.Add &quot;Discontinued&quot;, &quot;Discontinued&quot;, 4 << Error occur at this statement. (Field type in user control is checkbox).
End With

-------------------------------------------------------------------------------
But when I run program, the error &quot; Type Mismatch &quot; occur.
I try to solve this problem in many way but it still don't work.
Can anyone help me ??

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top