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
444
Web Drop Down Not Posting Back
posted

<asp:UpdatePanel runat="server" ID="uppnl1" ChildrenAsTriggers="true" UpdateMode="Conditional">
                <ContentTemplate>
                    <ig:WebDropDown ID="ddlCheck" runat="server" DataKeyFields="DPCK_ID"
                    DataSourceID="DealerChecksODS" DropDownAnimationDuration="1200"
                    DropDownAnimationType="EaseOut" DropDownContainerHeight="200px"
                    DropDownContainerMaxHeight="400px" DropDownContainerWidth="270px"
                    DropDownOrientation="Default" EnableDropDownAsChild="True"
                    MultipleSelectionType="Checkbox" PageSize="0" TextField="DPCK_CheckNumber"
                    ValueField="DPCK_ID" BorderStyle="Solid" BorderWidth="1px" Height="20px"
                    Width="130px"  ToolTip="Select a check for batching" AutoPostBack="true"  >
                    <Items>
                        <ig:DropDownItem Selected="true" Value="" Text="&lt;Choose Check&gt;" />
                    </Items>
                    <DropDownItemBinding TextField="DPCK_CheckNumber" ValueField="DPCK_ID"  />
                    <HeaderTemplate>
                        <div class="dealerCheckhdr">Deposit Checks</div>
                    </HeaderTemplate>
                    <ItemTemplate>
                    <span class="dealerCheckttl"><%#DataBinder.Eval(Container.DataItem, "DPCK_CheckNumber")%></span>:
                        <%#String.Format("{0:c}", DataBinder.Eval(Container.DataItem, "DPCK_CheckAmount"))%>
                    </ItemTemplate>
                    <AutoPostBackFlags SelectionChanged="On" ValueChanged="On" />
                </ig:WebDropDown>
                </ContentTemplate>
            </asp:UpdatePanel>

Code Behind

Private Sub WireEvents()
        AddHandler ddlCheck.SelectionChanged, AddressOf ddlCheck_SelectionChanged
        AddHandler ddlCheck.ValueChanged, AddressOf ddlCheck_ValueChanged
    End Sub


    Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
        WireEvents()
        End Sub

   Protected Sub ddlCheck_SelectionChanged(ByVal sender As Object, ByVal e As Infragistics.Web.UI.ListControls.DropDownSelectionChangedEventArgs)
        Dim i As Integer = 5
    End Sub

    Protected Sub ddlCheck_ValueChanged(ByVal sender As Object, ByVal e As Infragistics.Web.UI.ListControls.DropDownValueChangedEventArgs)
        Dim i As Integer = 5
    End Sub

I put break points on the Int=5 lines and neither of them are hit at any time no matter what. I followed the example on the samples site for ServerEvents and still nothing. Also one other thing, 

<ig:DropDownItem Selected="true" Value="" Text="&lt;Choose Check&gt;" /> does not show up in the drop down. I would like this to be the initially selected item. This item should not be in the template when you actually click the drop down to open it. I tried tapping into DataBound event

Public Sub ChecksDataBound(ByVal sender As Object, ByVal e As EventArgs)
        'ddlCheck.Items.Insert(0, New DropDownItem("<Choose Check>"))
    End Sub

That add the item the way I like, except that it ALSO creates a blank template item which is definitely not what I want. Any help is always appreciated.

 

Code On,

~ck