I can't figure out how to get the WebDropdown to autopostback ONLY when I have actually selected an item.
Using your own example shows the problem that I'm having. Please go to this page:
http://samples.infragistics.com/2009.1/WebFeatureBrowser/contents.aspx?showCode=True&t=WebDropDown/WebDropDownServerEvents.aspx~srcview.aspx?path=~srcview.aspx?path=WebDropDown/WebDropDownServerEvents.src
Now, click in the webDropDown, delete the text, and type just a 'B'. An autopostback happens, and says that I have selected "Berglunds snabbköp". Which is not the case - the webdropdown only has a 'B' in it.
I don't want a postback to happen until I either hit <enter> or click on a item. To further clarify my need, lets say that you actually wanted to select the second "B" item, which is "Blauer See Delikatessen". I want to be able to type "Bl" and not have a postback happen after the "B".
In my case, I'm setting EnableAutoFiltering="Client", which will filter the results. So, I want to be able to type a "B", and the result is filtered, BUT no postback happens yet, because I haven't selected anything yet. Then I type"L" (which filters, so "Blauer See Delikatessen", is now the first item - the item that I really want, so I now hit <enter>. This is when I want the autopostback to happen - because only now have I actually selected something. Up until now, I've only been typing.
Thanks,Jim
For me, the final solution was easy.... I deleted all the Infragistics software from my computer and purchased a new set of controls from Intersoft ( intersoftpt.com ). Their controls actually work the way people expect them to and they have great tech support...
Bye Infragistics....
Same issue here. If I backspace all the way it posts back. If I use an arrow key to try and move down and select an item in the list it posts back. I need it to only post back if I click an item or hit the other key and at NO other time.
<ig:WebDropDown ID="WebDropDown1" runat="server" Width="200px"
StyleSetName="Windows7" TextField="REQ_CLASS_NAME"
ValueField="REQ_CLASS_CODE" DataSourceID="dsReqClasses"
onselectionchanged="WebDropDown1_SelectionChanged"
EnableAutoFiltering="Client"
AutoSelectOnMatch="false" KeepFocusOnSelection="false"
EnableClosingDropDownOnSelect="false"
EnableCustomValueSelection="false"
EnableCustomValues="false"
>
<AutoPostBackFlags SelectionChanged="On" />
</ig:WebDropDown>
We've been using 11.1 which has this issue. I waited until Mid-November for ver 11.2. Downloaded the trial and setup a quick test site. Exact same problem still exists. My client was going to renew their subscription if it was fixed and get 11.2. Now they aren't going to.What a disappointment.
Unless a team member can tell me otherwise. Maybe there's a new property in 11.2 that I need to set to suppress the postbacks on every typed key?
I call a javascript function clientside that forces a postback on DropDownClosed to get the select item to work. There are still postbacks going in the background for getting more results but this lets me act on selection changed.
<script type="text/javascript">
function DrugSelected(sender, eventArgs) {
//force a postback so that the server side onselectionchanged code is run
theForm.submit();
}
</script>
These are my settings:
<ig:WebDropDown ID="wddSelectDrug" runat="server" EnableAutoFiltering="Server"
AutoFilterResultSize="10" PageSize="10"
EnableLoadOnDemand="True"
EnableCustomValueSelection="False"
onselectionchanged="wddSelectDrug_SelectionChanged"
AutoSelectOnMatch="False"
EmptyFilterBehavior="LimitToAutoFilterResultSize" >
<dropdownitembinding ValueField="DrugList_PKey" TextField="DrugName" />
<ClientEvents DropDownClosed="DrugSelected" />
<AjaxIndicator ImageUrl="Images/ajax-loader.gif" Text="loading" />
I think if DropDownClosed would be one of the autopostback settings that would fix this.
Note: If you are dealing with a lot of data, reset the default setting for
EmptyFilterBehavior to "LimitToAutoFilterResultSize" or the setting for EmptyItemsList.
hi,
try this: function selectionChanged(sender, args) { if (sender._activeItem != undefined) { __doPostBack('<%=YourWebDropDown.ClientID%>',''); } }
regards,Klaas Polinder