Product Bundles
DevCraft
All Telerik .NET and Kendo UI JavaScript components and AI Tools in one package.
Kendo UI
Bundle of AI Tools plus four JavaScript UI libraries built natively for jQuery, Angular, React and Vue.
Telerik
Build great .NET business apps
Net Web
Cross-Platform
Desktop
Reporting and Documents
Testing & Mocking
Debugging
Build JavaScript UI
Javascript
AI for Developers & IT
Ensure AI program success
AI Coding
Additional Tools
Enhance the developer and designer experience
UI/UX Tools
Free Tools
CMS
Support and Learning
Docs & Resources
Productivity and Design Tools
Hello Roger,
Yes, you can limit the total count of selected items in several ways:
Of course, you can combine the three approaches.
Code snippet for if / else statement:
<h4 class="text-info">Select multiple data</h4> @if (MySelectedItems.Count < MaximumNumberOfItems) { <TelerikMultiSelect Data="@Options" @bind-Value="@MySelectedItems" /> } else { <div class="alert alert-danger">You cannot select more items</div> } @if (MySelectedItems?.Count > 0) { <ul> @foreach (int item in MySelectedItems) { <li class="text-muted">@item</li> } </ul> } @code { int MaximumNumberOfItems = 5; List<int> MySelectedItems { get; set; } = new List<int>(); List<int> Options { get; set; } = Enumerable.Range(1, 20).ToList(); }
Regards, Svetoslav Dimitrov Progress Telerik