I'm trying to make a WebDropDown with lazy loading like the sample at http://help.infragistics.com/NetAdvantage/ASPNET/2010.3?page=WebDropDown_Lazy_Loading.html .
The event fire fine and the dataloads, however that the DropDownOpening client event keeps firing after I drop it down for the first time.
It happens in both Firefox 4 and IE 8. I'm using build 10.3.20103.2134
I've attached my sample project. The page in question is ClientEvents.aspx .
Here is a quick view of my code:
code behind:
public partial class ClientEvents : System.Web.UI.Page { DataTable colors = SampleData.GetColorDataTable(); protected void WebDropDown1_ItemsRequested(object sender, Infragistics.Web.UI.ListControls.DropDownItemsRequestedEventArgs e) { WebDropDown1.DataSource = colors; WebDropDown1.DataBind(); } }
aspx markup:
<ig:WebDropDown ID="WebDropDown1" runat="server" Width="200px" TextField="ColorName" ValueField="ColorId" onitemsrequested="WebDropDown1_ItemsRequested"> <ClientEvents DropDownOpening="WebDropDown1_DropDownOpening" /> </ig:WebDropDown>
java-script:function WebDropDown1_DropDownOpening(sender, eventArgs){ var wdd = $find("WebDropDown1"); wdd.loadItems(); }
Hello ssd,
Thank you for posting this.
The second parameter of this method was added in 10.3 version
I contacted the documentation team regarding this.
I fixed it with:
wdd.loadItems("",false);
which is documented at a 2010 forum post: http://community.infragistics.com/forums/t/40616.aspx
but not in the documentation at: http://help.infragistics.com/Help/NetAdvantage/ASPNET/2010.3/CLR4.0/html/WebDropDown~Infragistics.Web.UI.WebDropDown~loadItems.html