I have several infragistics webdropdown lists, each one in its own update panel. In code behind (VB.net), I filter the dropdown lists based on selections from higher-level dropdown lists. I have the dropdown lists set up as:
<asp:UpdatePanel ID="PlantAsync" runat="server" ChildrenAsTriggers="False" UpdateMode="Conditional">
<ContentTemplate>
<ig:WebDropDown ID="PlantsList" AutoPostBack="True" EnableMultipleSelection="true" Width="100px" DropDownContainerWidth="300px" CssClass="LeftAlign" EnableClosingDropDownOnSelect="false" runat="server" NullText=" "/>
</ContentTemplate>
</asp:UpdatePanel>
When the page first loads, everything works fine.
But when the PlantAsync.Update() command is executed, some of the attributes are lost. EnableClosingDropDownOnSelect and Width are set to default, while DropDownContainerWidth and EnableMultipleSelection values seem to be maintained.
The only one I'm concerned about is EnableClosingDropDownOnSelect. Having this return to 'true' prevents the user from selecting multiple items at once. How do I keep this set to 'false' on update?
Hello Jesse,
You may set the EnableClosingDropDownOnSelect property to false on PageLoad or PreRender events.
If you have any questions, please let me know as well.
I have EnableClosingDropDownOnSelect set to false for every dropdown list. Even so, I tried setting it to false in the page_load event and the index_changed event, and it does nothing.
Here is a bit more detail on how to reproduce this issue: Use the code above to create several webdropdowns (put them all in the same update panel, or create several panels, it doesn't matter.) My lists are dynamically created from a database so you will probably need to do the same. Create the selectedItem events for the dropdown list, and add PlantAsync.Update() inside the event. Run the code and you will see that every time you make a selection in a webdropdown, the dropdown closes and the width goes back to default.
It's been 2 1/2 weeks, is anybody still looking into this???
I am just following up and see how it worked out with the WebDropDown and is you have any questions.
It is as expected that EnableClosingDropDownOnSelect is overridden on UpdatePanel1.Update() on selectionChanged as the WebDropDown is re-initialized.
You persist the selection and keep the DropDown open on selection by handling the DropDownClosed clientside event as follows:
function WebDropDown1_DropDownClosed(sender, eventArgs)
{
// this refreshes the UpdatePanel
__doPostBack('UpdatePanel1', '');
}
And set the AutoPostBack property of the WebDropDown to false as the UpdatePanel provides the AJAX functionality.
For more information, you may refer to the attached sample. Please let me know if this is a feasible alternative or otherwise.
If the issue persists, please let me know the version and build as well as browsers you are using.