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
55
WebDropDown client side events not firing consistently and weird property values
posted

Hi folks, hoping someone can help me figure out what I am doing wrong.  Or maybe just point out that I completely lost my marbles.

I am getting inconsistent results when using the client side events for keydown, keyup, ValueChanging, and ValueChanged.  The first value placed in the textbox gets all 4 events fired.  Subsequent values are mostly just getting a keydown event.  But sometimes it fires the others.

Also the wdd _previousValue property and get_currentValue() do not seem to be correct either. It is always lagging or just stuck in time somewhere.

I pasted in (can't attach for some reason) a very simple example that illustrates the issue using debug statements in the client script.

Any insight would be greatly appreciated.

Thanks,

Jason

Client script:

<script type="text/javascript">

 function wdd_ValueChanging(sender, e) {

debugger;

}

function wdd_ValueChanged(sender, e) {

debugger;

}

function wdd_InputKeyDown(sender, e) {

debugger;

}

function wdd_InputKeyUp(sender, e) {

debugger;

}

 </script>

 

Control Markup:

<ig:WebDropDown ID="wdd" runat="server" Width="100%" DropDownContainerHeight="250px"

EnableClosingDropDownOnBlur="false" EnableClosingDropDownOnSelect="true" DropDownContainerWidth="500px"

Button-Visible="true" AutoSelectOnMatch="False" ClientEvents-InputKeyDown="wdd_InputKeyDown"

ClientEvents-InputKeyUp="wdd_InputKeyUp" ClientEvents-ValueChanged="wdd_ValueChanged"

ClientEvents-ValueChanging="wdd_ValueChanging">

<HeaderTemplate>

<table style="width: 100%; height: 40px; background-color: Blue; color: White; font-size: 12px;

font-weight: bold;" cellspacing="0" cellpadding="4">

<tr>

<td style="width: 50px;">

FirstName

</td>

<td style="width: 50px; text-align: left;">

LastName

</td>

</tr>

</table>

</HeaderTemplate>

<ItemTemplate>

<table style="width: 100%;" cellspacing="0" cellpadding="4">

<tr style="border-bottom: solid 1px #ff0000;">

<td style="width: 130px; padding-left: 10px; border-bottom: solid 1px #E8E8E8;">

<%#DataBinder.Eval(Container.DataItem, "FirstName")%>

</td>

<td style="width: 100px; text-align: left; padding-left: 25px; border-bottom: solid 1px #E8E8E8;">

<%#DataBinder.Eval(Container.DataItem, "LastName")%>

</td>

</tr>

</table>

</ItemTemplate>

</ig:WebDropDown>

 

Parents
No Data
Reply
  • 55
    posted

    OK, some more info.  It looks like this is only happening then the control loses focus while in the keydown event (debugging in my case).  It behaves as expected when not debugging.  It can be reproduced with an alert in keydown as well.  The part that was confusing me even more was that the value in the textbox is changing as expected.  But the wdd is not aware of the change so it gets all screwed up.

    It does not seam like that should happen but maybe it is the nature of the beast due to the keyup event not firing?  Ouch.

Children
No Data