I am using a WebDropDown with a large dataset.
I set the SelectCommand of an SQLServer datasource at page load.
I set the webdropdown to EnableLoad on demand but it's not working.
ID="WebDropDownAluno" runat="server" Width="400px" AutoPostBack="False" ToolTip="Selecione o aluno" DataSourceID="SqlDataSourceAluno" DataKeyFields="Matrícula" ValueField="Matrícula" TextField="Nome" onselectionchanged="WebDropDownAluno_SelectionChanged" AutoPostBackFlags-ValueChanged="Off" AutoSelectOnMatch="False" AutoPostBackFlags-SelectionChanged="On" AutoFilterTimeoutMs="200" EnableAutoCompleteFirstMatch="False" EnableAutoFiltering="Server" EnableViewState="false" AutoFilterQueryType="Contains" AutoFilterResultSize="50" EnableLoadOnDemand="true"
At PageLoad:
SqlDataSourceAluno.ConnectionString = "some connection string"; SqlDataSourceAluno.SelectCommand = "some SQL text";
Hello Miranda,
I am still following your case. Have you been able to resolve you issue? Feel free to contact me if you have any additional questions regarding this matter.
Thank you for posting in the community.
I investigated the code snippet provided and everything seems correct.
Could you please provide some additional information in order to investigate the issue further:
1. Is your application throwing any kind of exception or it just does not load the data?
If it`s not loading the data what I can suggest is calling the DataBind method after setting the select command.
2. Which version of NetAdvantage are you using?
A small isolated sample where the issue is reproducibe would be highly appreciated.
Looking forward to hearing from you.