Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
90
WebCombo 8.3: InitializeDataSource event handled from Repeater. (Paging)
posted

Hi. I need to know how to handle InitializeDataSource events from dynamically generated WebCombo boxes inside a repeater so that I can use paging.

My VB looks something like this:

  Private DataClasses As DataClassesDataContext
  Private EmpData As List(Of GetAllEmployeesResult)

  Protected Sub Page_Load(ByVal sender As Object, ByVal e As  _
                          System.EventArgs) Handles Me.Load

    DataClasses = New DataClassesDataContext

    '***Set the repeater data source
    repeaterDisciplines.DataSource = DataClasses.GetAllDisciplines()
    repeaterDisciplines.DataBind()

    '***Set up the data source for the employee list
    EmpData = DataClasses.GetAllEmployees("").ToList()
    
    '***Reference all the webcombo boxes in the repeater to initialize them.
    For Each item As RepeaterItem In repeaterDisciplines.Items
      For Each ctl As Control In item.Controls()
        If TypeOf ctl Is Infragistics.WebUI.WebCombo.WebCombo Then
          Dim combo As Infragistics.WebUI.WebCombo.WebCombo = CType(ctl, Infragistics.WebUI.WebCombo.WebCombo)
          combo.DataSource = EmpData
          combo.EnableXmlHTTP = True
          combo.DropDownLayout.Pager.AllowPaging = True
          combo.DropDownLayout.Pager.PageSize = 20
          'How do I handle the InitializeDataSource event here?
        End If
      Next
    Next
  End Sub

My ASP looks something like this:

                  <asp:UpdatePanel ID="upRepeater" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
                    <ContentTemplate>
                      <asp:Repeater ID="repeaterDisciplines" runat="server" OnItemCommand="repeaterDisciplines_ItemCommand">
                        <ItemTemplate>
                          <tr>
                            <td class="tdLabel" style="text-align: left;"> <!--stuff--> </td>
                            <td class="tdInput">
                              <igcmbo:WebCombo ID="WebCombo1" runat="server" >
                              </igcmbo:WebCombo>
                            </td>
                            <td><!--stuff--></td>
                            <td><!--stuff--></td>
                          </tr>
                        </ItemTemplate>
                      </asp:Repeater>
                    </ContentTemplate>
                  </asp:UpdatePanel>

Thanks,

Dan Wahlstrom