Questions:
I have four questions. Let me know if you would rather these be separated into individual threads.
Background:
I am using version 19.4.0.53 with the following code (based on one of your samples):
@using Syncfusion.Blazor.DropDowns
@using System.Diagnostics
Select your favorite car:
DataSource="@vehicleData"
TItem="ListItem"
TValue="string[]"
MaximumSelectionLength=@maxSelectionLength
AllowDragAndDrop=false
>
ShowSelectAll=false
CheckboxPosition=CheckBoxPosition.Left
Mode=SelectionMode.Multiple
>
Value="Id"
GroupBy="Speed"
>
Position=ToolBarPosition.Right
>
TValue="string[]"
DragStart=@OnDragStart
ValueChange=@OnValueChange
>
@code{
private string[] value = new string[] { "List-01" };
private string[] toolbarItems = new string[] { "MoveUp", "MoveDown", "MoveTo", "MoveFrom", "MoveAllTo", "MoveAllFrom" };
private double maxSelectionLength;// = 5.0;
private ListvehicleData = new List
{
new ListItem { Text = "Hennessey Venom", Id = "List-01", Speed="Fast" },
new ListItem { Text = "Bugatti Chiron", Id = "List-02", Speed="Fast" },
new ListItem { Text = "Bugatti Veyron Super Sport", Id = "List-03", Speed="Fast" },
new ListItem { Text = "SSC Ultimate Aero", Id = "List-04", Speed="Fast" },
new ListItem { Text = "Koenigsegg CCR", Id = "List-05", Speed="Fast" },
new ListItem { Text = "McLaren F1", Id = "List-06", Speed="Slow" },
new ListItem { Text = "Aston Martin One-77", Id = "List-07", Speed="Slow" },
new ListItem { Text = "Jaguar XJ220", Id = "List-08", Speed="Slow" },
new ListItem { Text = "McLaren P1", Id = "List-09", Speed="Slow" },
new ListItem { Text = "Ferrari LaFerrari", Id = "List-10", Speed="Slow" }
};
private void OnDragStart(DragEventArgsargs)
{
Debug.WriteLine("OnDragStart method invoked.");
}
private void OnValueChange(ListBoxChangeEventArgsargs)
{
Debug.WriteLine("OnValueChange method invoked:");
if (args.Value is not null) this.value = args.Value;
}
public class ListItem
{
public string Text { get; set; }
public string Id { get; set; }
public string Speed { get; set; }
}
}
Observations:
Update...I noticed more odd behaviors
Sorry you are having problems with the code snippet provided. Attached is a VS2022 solution that demonstrates the issues.
I copied the notes from my posts in the ProblemDemo.razor file for easy reference.
Attachment: SfListBoxProblemDemo_2d741ed8.zip
Thank you for reviewing my questions.
I understand the application of MaximumSelectionLength by the ListBox component and will adjust my usage accordingly.
I look forward to the March release to address items #5, #6, #8 and #9.
I still am confused with #7. I updated to the .55 release and the Select All element is displayed as originally stated. This is the result of the codebase I sent you with the following adjustments:
However, a single modification to the above--changing the AllowFiltering to true--produces: