Cannot send data if the connection is not in the 'Connected' State When using drop down.

When using the drop down, I get this message when changing values. 

Cannot send data if the connection is not in the 'Connected' State SfDropDown

List is populated, all binding seems to be accurate.  The Code looks like this:

                        <SfDropDownList @bind-Value="@ProjectUID" DataSource="@_ProjectList" TItem="Project" TValue="string" Placeholder="Select Project...">
                            <DropDownListFieldSettings Value="ProjectUID" Text="ProjectName"></DropDownListFieldSettings>
                        </SfDropDownList>

in @code:

    public string ProjectUID { get; set; }
    public List<Project> _ProjectList { get; set; }


projectList is being properly properly populated as I can see the values in the drop down.  I I change a value, I get the connection error message as above. 


3 Replies

SN Sevvandhi Nagulan Syncfusion Team April 3, 2020 02:12 PM UTC

Hi Peter, 

Greetings from Syncfusion support. 

We have checked the reported issue by using the shared code snippet. In the provided code example you have placed some of  the Sycnfusion components in card. We did not whether the  <card> is custom component or card component. So we placed the all components into the Syncfusion card component. But we could not reproduce the issue. Kindly refer the below code, 

<SfCard> 
    <CardContent> 
        <SfDropDownList @bind-Value="@ProjectUID" DataSource="@_ProjectList" TItem="Project" TValue="string" Placeholder="Select Project..."> 
            <DropDownListFieldSettings Value="ProjectUID" Text="ProjectName"></DropDownListFieldSettings> 
        </SfDropDownList> 
    </CardContent> 
</SfCard> 

Please find the sample below, 

 
Also, we have recorded the video for your reference.  

 
In the latest release we have removed the referring of scripts in the host.cshtml. In the page if referred the scripts, remove the scripts. You need to refer the styles alone in the page. Please find the breaking changes link below, 

 
If we misunderstood your query kindly share the below details that help us to proceed further. 
  1. Issue reproducing sample
  2. Share the sufficient code for reproduce the issue
  3. Modify the above sample to replicate the issue

Regards, 
Sevvandhi N 



PE Peter April 7, 2020 06:35 PM UTC

I still think there may be an issue here.  I noticed that your example has a local project class, not an EFCore Entity.  So even with the above example, when I modified it to bind to a collection of objects retrieved using EFCore I get the error.  

However if I did this:

_ProjectList = _projectService.GetActive().Select(x=> new LocalProject { ProjectName = x.ProjectName, ProjectUID = x.ProjectUID }).ToList();

And I changed the TItem Type and ProjectList Type to a local class I used called LocalProject then it works fine with no errors. 

Think it has something to do with using connected EF Core Entity Objects in the list. 


SN Sevvandhi Nagulan Syncfusion Team April 8, 2020 03:11 PM UTC

Hi Peter, 

Thanks for the update. As per the reported requirement, we checked the issue and could not reproduce in our end. Please find the sample below, 

protected override async Task OnInitializedAsync() 
    { 
        _ProjectList = ownservice.GetData().Select(x => new LocalProject { ProjectName = x.ProjectName, ProjectUID = x.ProjectUID }).ToList(); 
    } 


 
Can you please provide the sufficient code for reproducing the issue or provide the class details or modify the above to replicate the issue. It will help us to provide the prompt solution at our end. 

Regards, 
Sevvandhi N  


Loader.
Up arrow icon