This is driving me nuts.
I have tried the .clear() and I have tried re-init the object. Nothing seems to clear this from the UI that the user sees.
on the razor page:
<TelerikMultiSelect @ref="DDLFil1"
Class="my-multiselect"
Data="@DDLFil1List"
TextField="Result"
TItem="DDLList"
ValueField="Result"
TValue="string"
Placeholder="Select the items you need"
AutoClose="false"
Filterable="true"
ClearButton="true"
>
<MultiSelectSettings>
<MultiSelectPopupSettings Height="500px" />
</MultiSelectSettings>
<HeaderTemplate>
<label style="padding: 4px 8px;">
<TelerikCheckBox TValue="bool" Value="@DDLFil1_IsAllSelected()" ValueChanged="@( (bool v) => DDLFil1_ToggleSelectAll(v) )"></TelerikCheckBox>
Select All
</label>
</HeaderTemplate>
</TelerikMultiSelect>
In the CS behind the code page:
public TelerikMultiSelect<DDLList, string> DDLFil1 { get; set; } // Ctrl on the webpage
private bool blnHideDDLFil1 { get; set; } = true;
string DDLFil1Lbl = "";
List<DDLList> DDLFil1List = new List<DDLList>();
string? _DDLFil1SelectedId;
string DDLFil1SelectedId
{
get
{
return _DDLFil1SelectedId;
}
set
{
_DDLFil1SelectedId = value;
}
}
List<string> DDLFil1Values { get; set; } = new List<string>();
List<string> DDLFil1Results { get; set; } = new List<string>();
Clearing code:
if (DDLFil1.Value != null)
{
if (DDLFil1.Value.Count() > 0)
{ // Items have been selected!
DDLFil1.Value.Clear();
};
};
How does one Clear the selected items for the user to re-use without having them to unselect each item.
You have a ClearSelectAll Button on the Control. sometimes hard for the user to see it with multiple items selected.
Would be nice if i could call that in code!!!
DDLFil1.ClearSelectedAll();
I really need this feature.
Thanks