Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You should check which itemtype is being fired on the <code>ItemDataBound</code> event, this may or may not be the problem, as you don't have a header and footer template, however it is still good practice.</p> <pre><code>Protected Sub rp_Groups_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.RepeaterItemEventArgs) Handles rp_Groups.ItemDataBound If e.Item.ItemType = ListItemType.Item OrElse e.Item.ItemType = ListItemType.AlternatingItem Then Dim chklist As CheckBoxList = DirectCast(e.Item.FindControl("chk_Items"), CheckBoxList) If chklist IsNot Nothing Then chklist.DataSource = DirectCast(e.Item.DataItem, DataRowView).CreateChildView("FK_esnServiceType_Service_Type_Categorization") chklist.DataBind() End If End If End Sub </code></pre> <p><strong>EDIT</strong></p> <p>I've just noticed that you are adding the relation after you have already binded the repeater's datasource. Try moving the <code>.databind</code> after the relation has been added.</p> <p><strong>EDIT 2</strong></p> <p>OK can you try this. Add the <code>datatables</code> to the <code>dataset</code> and set the repeaters datasource to: <code>ds.Tables(0)</code></p> <pre><code>Public Sub Fill() Dim ds As New DataSet() Dim dtServiceCategory As DataTable = ServiceTypeModel.GetService_Categories() Dim dtServiceType As DataTable = ServiceTypeModel.Search("", True) ds.Tables.Add(dtServiceCategory) ds.Tables.Add(dtServiceType) Dim relation As New DataRelation("FK_esnServiceType_Service_Type_Categorization", ds.Tables("dtServiceCategory").Columns("service_type_category_id"), ds.Tables("dtServiceType").Columns("CategorizationID"), False) relation.Nested = True ds.Relations.Add(relation) rp_Groups.DataSource = ds.Tables(0) rp_Groups.DataBind() End Sub </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload