Re: Error: No default member found for type MyClass
From: Andy Eshtry (andyeshtry_at_hotmail.com)
Date: 02/15/04
- Next message: james: "Re: Animated GIF in PictureBox Not Moving"
- Previous message: Trev Hunter: "Re: Image Question"
- In reply to: Cor: "Re: Error: No default member found for type MyClass"
- Next in thread: Cor: "Re: Error: No default member found for type MyClass"
- Reply: Cor: "Re: Error: No default member found for type MyClass"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 14 Feb 2004 19:34:04 -0500
Thank you very much. Is there a sample code I can use to bind a user defined
collection to a
datagrid.
I used collection cause I want to assigned mulitple postal code to agents so
it is a many to many relationship and I have used "prevselected" and
"selected" properties to track which checkboxes of each postal code the user
checked or unchecked in a grid so that only add or delete a row in the
middle table (between postal code and agent tables) and do nothing for the
postal code that there were no activity on them by user.
Default Public ReadOnly Property Item(ByVal Index As Integer) As
clsAgentPostalCode
Get
Return CType(List(Index), clsAgentPostalCode)
End Get
End Property
Would you please what is wrong to my databinding code?
If Not Page.IsPostBack Then
dgPostalCode.DataKeyField = "AssignedPostalCodeID"
Dim oAgentPostalCodeCollection As New clsAgentPostalCodeCollection(lAgentID)
dgPostalCode.DataSource = oAgentPostalCodeCollection
dgPostalCode.DataBind()
End If
"Cor" <non@non.com> wrote in message
news:eV0WHUv8DHA.3200@TK2MSFTNGP09.phx.gbl...
> Hi Andy,
>
> You try to make from your dataset a collection to bind that to a datagrid.
> The ideal collection to bind to a datagrid as a datasource is the
datatable
> a part of the dataset.
>
> What is the reason you take this very difficult route?
> (While it is a webpage and therefore the collection is gone when you have
> binded it, because I do not see it been saved somewhere by you).
>
> Cor
>
>
- Next message: james: "Re: Animated GIF in PictureBox Not Moving"
- Previous message: Trev Hunter: "Re: Image Question"
- In reply to: Cor: "Re: Error: No default member found for type MyClass"
- Next in thread: Cor: "Re: Error: No default member found for type MyClass"
- Reply: Cor: "Re: Error: No default member found for type MyClass"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|