Dual list box error.

The documentation for dual list boxes appears to be out of date at https://blazor.syncfusion.com/demos/listbox/dual-listbox?theme=bootstrap4

Scope="combined-list" isn't correct in the example.

<div id="listbox1">
    <h4>Group A</h4>
    <SfListBox TValue="string[]" DataSource="@Groupc" Scope="combined-list" AllowDragAndDrop="true"  height="290px" TItem="CountryCode">
        <ListBoxFieldSettings Text="Name" Value="Code" />
    </SfListBox>
</div>
<div id="listbox2">
    <h4>Group B</h4>
    <SfListBox TValue="string[]" DataSource="@Groupd" Scope="combined-list" AllowDragAndDrop="true" height="290px" TItem="CountryCode">
        <ListBoxFieldSettings Text="Name" Value="Code" />
    </SfListBox>
</div>

5 Replies 1 reply marked as answer

AS Aravinthan Seetharaman Syncfusion Team December 24, 2020 05:48 AM UTC

Hi Alain, 
  
  
Thanks for contacting Syncfusion support. 
We are improving our documentation section, and it will be refreshed on 30th December 2020. 
To use Dual List Box please refer below code snippet. 
 
<div class="dual-list-groupa"> 
                <h4> Group A</h4> 
                <SfListBox @ref="listbox1" Scope="@scope1" DataSource="@GroupA" TItem="ListData" Height="330px" TValue="string[]"> 
                    <ListBoxFieldSettings Text="Name" Value="Code"></ListBoxFieldSettings> 
                    <ListBoxToolbarSettings Items="@Items"></ListBoxToolbarSettings> 
                </SfListBox> 
            </div> 
            <div class="dual-list-groupb"> 
                <h4>Group B</h4> 
                <SfListBox @ref="listbox2" Scope="@scope2" DataSource="@GroupB" Height="330px" TItem="ListData" TValue="string[]"> 
                    <ListBoxFieldSettings Text="Name" Value="Code"></ListBoxFieldSettings> 
                </SfListBox> 
            </div> 
 
 
Could you please check the above details, and get back to us, if you need assistance on this. 
  
  
Regards, 
Aravinthan S 



JB Joachim Bergholz July 14, 2021 12:09 PM UTC

Hallo,

the example
https://www.syncfusion.com/downloads/support/forum/160925/ze/DualListBox1935715177 
works only up to Version 19.1.0.59

With Version 19.1.0.63 or higher, the example get compilation errors:

Fehler CS1503 Argument "1": Konvertierung von "Syncfusion.Blazor.DropDowns.SfListBox<string[], ListData>" in "string" nicht möglich.

Fehler CS1503 Argument "1": Konvertierung von "Syncfusion.Blazor.DropDowns.SfListBox<string[], ListData>" in "string" nicht möglich.

How can i compile it with an actual version of Syncfusion Blazor?
Thanks in advance.

Kind regards
Joachim



AS Aravinthan Seetharaman Syncfusion Team July 15, 2021 10:50 AM UTC

 
We have checked your query. We would like to let you know that we have included the Breaking change in the version 19.1.63. We have changed the Scope type into string. Please find the same from the link below. 
 
For your convenience we have prepared sample in our latest version 19.2.47. Please refer the below code snippet and sample. 
 
 
@using Syncfusion.Blazor.DropDowns 
 
<div id="listbox1"> 
    <h4>Group A</h4> 
    <SfListBox TValue="string[]" DataSource="@GroupA" Scope="scope2" TItem="CountryCode"> 
        <ListBoxFieldSettings Text="Name"></ListBoxFieldSettings> 
        <ListBoxToolbarSettings Items="@Items"></ListBoxToolbarSettings> 
    </SfListBox> 
</div> 
<div id="listbox2"> 
    <h4>Group B</h4> 
    <SfListBox TValue="string[]"  DataSource="@GroupB" TItem="CountryCode" @attributes="listbox2Attr"> 
        <ListBoxFieldSettings Text="Name"></ListBoxFieldSettings> 
    </SfListBox> 
</div> 
 
@code { 
 
    private readonly Dictionary<string, object> listbox2Attr = new Dictionary<string, object> 
    { 
        { "id", "scope2" } 
    }; 
    public string[] Items = new string[] { "MoveUp", "MoveDown", "MoveTo", "MoveFrom", "MoveAllTo", "MoveAllFrom" }; 
    public List<CountryCode> GroupA = new List<CountryCode> 
    { 
        new CountryCode{ Name = "Australia", Code = "AU" }, 
        new CountryCode{ Name = "Bermuda", Code = "BM" }, 
        new CountryCode{ Name = "Canada", Code = "CA" }, 
        new CountryCode{ Name = "Cameroon", Code = "CM" }, 
        new CountryCode{ Name = "Denmark", Code = "DK" }, 
        new CountryCode{ Name = "France", Code = "FR" }, 
        new CountryCode{ Name = "Finland", Code = "FI" } 
    }; 
 
    public List<CountryCode> GroupB = new List<CountryCode> 
    { 
        new CountryCode{ Name = "India", Code = "IN" }, 
        new CountryCode{ Name = "Italy", Code = "IT" }, 
        new CountryCode{ Name = "Japan", Code = "JP" }, 
        new CountryCode{ Name = "Mexico", Code = "MX" }, 
        new CountryCode{ Name = "Norway", Code = "NO" }, 
        new CountryCode{ Name = "Poland", Code = "PL" }, 
        new CountryCode{ Name = "Switzerland", Code = "CH" } 
    }; 
 
    public class CountryCode 
    { 
        public string Name { get; set; } 
        public string Code { get; set; } 
    } 
} 
 
 
 
Could you please check the above details, and let us know if you have any concern on this. 
 
Regards, 
Aravinthan S

Marked as answer

JB Joachim Bergholz July 15, 2021 04:18 PM UTC

Thank you for your fast reply, Aravinthan.
Very good service :-

Now it is working.
In future, i'will hav a look in the breaking change ;-)

Kind regards
Joachim



AS Aravinthan Seetharaman Syncfusion Team July 16, 2021 05:01 AM UTC

Hi Joachim, 
 
Thanks for the update. 
 
We are happy to hear that your issue has been resolved. Please feel free to contact us if you need any further assistance on this. 
 
Regards, 
Aravinthan S 


Loader.
Up arrow icon