<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="<Choose Check>" /> </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="<Choose Check>" /> 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
Hi,
Thanks for your feedback. About your first question, you can take a look at my second post here:
http://forums.infragistics.com/forums/p/25419/93185.aspx
What basically happens is that since you have AutopostBack=true, it will enable full auto postback for both the value changed and the selection changed event. Since selection changing fires first on the client, and only after that value changed fires, the value change code won't be executed on the client-side, hence value will not be changed, and the server-side value changed event won't fire.
What i suggest is to set AutoPostback flag for only the ValueChanged event (via AutoPostBackFlags tag). This will still invoke all selection logic, and you will get the selectionChanged server-side handler fire as well.
For your second question, if you only add this item so that you get initial text in the input box, you can just set CurrentValue of the WebDropDown to this text:
WebDropDown1.CurrentValue = "Select something / check something";
(or you can set this directly in the ASPX code).
Please let me know if this works out for you, if not i will do my best to help again.
Thanks,
Angel
Infragisitcs controls are so ridiculously worthless. Nothing ever works the way it's supposed to.
<
ig:webdropdown
id="ddlCheck" runat="server" AutoPostBack="false"
datakeyfields="DPCK_ID" datasourceid
="DealerChecksODS"
dropdowncontainerheight="200px" dropdowncontainermaxheight="400px"
dropdowncontainerwidth="270px" dropdownorientation
="Default"
pagesize="0" textfield="DPCK_CheckNumber" OnValueChanged
="ddlCheck_ValueChanged"
borderwidth="1px" height="20px" width
="130px"
="Select a check for batching">
/>
>
:
<%
#String.Format("{0:c}", DataBinder.Eval(Container.DataItem, "DPCK_CheckAmount"
))%>
</ItemTemplate
</
asp:ObjectDataSource ID="DealerChecksODS" runat="server"
OldValuesParameterFormatString="original_{0}" SelectMethod="GetDepositChecks"
TypeName
="DepositCheck">
Type="String"
asp:ObjectDataSource
then the code behind
Protected Sub ddlCheck_ValueChanged(ByVal sender As Object, ByVal e As
Infragistics.Web.UI.ListControls.DropDownValueChangedEventArgs)
Dim i As Integer
= 5
End
Sub
No matter what the heck I do I cannot hit a breakpoint in the valueChanged event. What the heck is wrong with your guys' stuff. It's just an absolutely worthless terrible product. Truly unbelievable!!!!!
I wish we NEVER EVER Got involved with Infragistics. It has just been a terrible nightmarish experience. I won't waste another minute asking for help. Nothing you guys ever suggest works. Absurd!
Could you upgrade to the latest service release? Or if you still want to use the volume release (build number 1015), set AutoPostBack=false, and in <AutoPostBackFlags> set ValueChanged=On
How can I upgrade? Is there any link?
If you are a licensed customer:
To download the service release, log in to
‘My IG’ and select ‘Keys & Downloads’. Select the appropriate tab for this product; then the license key. The available service releases (Hot Fixes) should now be listed on the page
If you use a Trial license you need to create a support request, so that a Development Support Engineer can send you directly the link with the service release download.
http://es.infragistics.com/support/submitrequest.aspx
Hope it helps,
Hello
I have the dropdown and selectedvalue change event in the User control and I am adding the User control to my main aspx page. So it is still not fireing the event.
Hi anok,
I have created a sample WebSite for you where the WebDropDown is in a user control, and the control is added to Default.aspx. SelectionChanged server-side event is defined as well, and if you put a breakpoint , it will be hit.
The website is attached.