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
100
Webdropdown will not select
posted

Hi There

I have a webdropdown that is bound to a sql dataset to populate its items. When the dropdown is opened it will not select the first item in the list. If any other item is selected first then the initial item is reselected it will select OK. Code as follows:

<ig:WebDropDown ID="WebDropDownPrincipalID"
                runat="server" Width="150px" DropDownAnimationType="Linear"
                DropDownContainerHeight="0px" DropDownContainerMaxHeight="0px"
                DropDownContainerWidth="0px" 
                StyleSetName="Trendy"
                onitemsrequested="WebDropDownPrincipalID_ItemsRequested">
                <clientevents focus="wddOpening" />

            </ig:WebDropDown>

 function wddOpening(sender, e) {
         
        sender.loadItems();
       }

 

I have investigated this at length and cannot see what is going on.

 

Any suggestions??

Parents
No Data
Reply
  • 24671
    posted

    Hi,

    Thanks very much for your input. What code do you have in the ItemsRequested handler on the server-side? I am using this code in my handler, and i can select the first item, when items are loaded:

       protected void WebDropDown1_ItemsRequested(object sender, Infragistics.Web.UI.ListControls.DropDownItemsRequestedEventArgs e)

        {

            this.SqlDataSource1.SelectCommand = string.Format("SELECT * FROM Products WHERE ProductName LIKE '{0}%'", e.Value.ToString().ToLower());

            this.WebDropDown1.DataSource = SqlDataSource1;

            this.WebDropDown1.DataBind();

        }

    The ASPX code and javascript client-side event handler I am using is the same as in your example above.

    P.S: I am selecting the item with the mouse, not using the API (server or client-side) - if this could make a difference. 

    Thanks,

    Angel 

Children