We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

big data causing an error


I am using combobox with a big data (more than 10000 items), to make it simple, I just use local data.  When click the combobox, it shows blank, and the web debug console show an exception: Connection closed with an error.

Can you guys show me how to fix this issue? Thanks!

My code is like this:
                                        <EjsComboBox TValue="string" ModelType="@typeof(LookupBean)" Placeholder="--Select--" DataSource="@AccountLookups">
                                            <ComboBoxFieldSettings Text="Code" Value="Code"></ComboBoxFieldSettings>
                                        </EjsComboBox>

3 Replies

SP Sureshkumar P Syncfusion Team February 4, 2020 11:53 AM UTC

Hi Haizhi, 
 
Greetings from Syncfusion support. 
 
We have validated your reported requirement and we had tried to reproduce your issue, but unfortunately the issue has not been reproduced with your given requirement. We have prepared sample based on your requirement with more than 10000 data (given 20000 data). For your convenience, we have prepared a sample. Please find the below sample link. 
 
 
We suspect that, If you have used combobox template then, please use the below work around solution to get rid of the reported issue in ComboBox. This issue occurred due to SignalR buffer size, we suggest increasing the MaximumReceiveMessageSize in Startup.cs file in your applications. 
 
[startup.cs] 
 
public void ConfigureServices(IServiceCollection services) 
        { 
            services.AddRazorPages(); 
            services.AddServerSideBlazor(); 
            services.AddSingleton<WeatherForecastService>(); 
            services.AddSyncfusionBlazor(); 
            services.AddSignalR(e => 
            { 
                e.MaximumReceiveMessageSize = 1024000; 
            }); 
        } 
 
 
After trying those solution, If the issue still exists, please try the below method to get rid of your reported issue. 
 
While we bind large number of datasource, connection is timed out during data transfer from client to server. So, we suggest you use Query property.  Using this property, at initial rendering you can render first ten data. On filtering you have to render other data. Please find the below code snippet: 
 
[Index.razor] 
 
<EjsComboBox @ref="comboboxObj" Placeholder="--Select--" TValue="long"  
             DataSource="@Customers.Select(c => new { Value = c }).ToList()" 
             Query="@query" AllowFiltering="true"> 
    <ComboBoxFieldSettings Text="Company" Value="CustomerID"></ComboBoxFieldSettings> 
</EjsComboBox> 
 
@code 
{ 
    EjsComboBox<long> comboboxObj; 
 
    public string query = "new ej.data.Query().select(['value']).take(10)"; 
 
    public List<long> Customers = Enumerable.Range(0, 10000).Select(c => (long)c).ToList(); 
 
} 
 
Could you please check the sample and get back to us, if you need any further assistance on this?  
 
Regards, 
Sureshkumar P 



HZ haizhi zhong February 4, 2020 07:10 PM UTC

Hi Sureshkumar,

Thank you for the quick reply. 

I tried your sample project, it doesn't  work. I reduce the items from 20000 to 2000, then it works.  Did something missed there?

The filter way doesn't work for me, the users click the combobox instead of typing, and that supposes to show the whole list.  


PM Ponmani Murugaiyan Syncfusion Team February 6, 2020 02:06 AM UTC

Hi Haizhi, 
  
The sample project we have given with 20000 data, so for loading the items in the popup, it delayed to open the dropdown for few seconds. But the dropdown will get open. Also unable to reproduce your issue "While click the combobox, it shows blank and console show an exception". 
  
Please provide the below details to provide the solution at earliest. 
  
1. Whether you have used template in combobox.  
2. Provide code snippet with additional information. 
3. Provide issue reproducing sample for further clarification. 
  
Regards, 
Ponmani M 


Loader.
Live Chat Icon For mobile
Up arrow icon