|
<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> |
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
|
@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; }
}
}
|
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