Hi Yeadam,
Thanks for contacting Syncfusion Spport.
We have checked your reported query, and we can achieve your requirement by calling selectAll method with true, from created event handler.
Index.cshtml
|
<ejs-listbox id="listbox" dataSource="@ViewBag.data" created="created">
<e-listbox-selectionsettings showCheckbox="true"></e-listbox-selectionsettings>
</ejs-listbox>
<script>
function created() {
var listBox = ej.base.getComponent(document.getElementById("listbox"), "listbox");
listBox.selectAll(true);
}
</script> |
HomeController.cs
|
using Microsoft.AspNetCore.Mvc;
namespace WebApplication1.Controllers
{
public class HomeController : Controller
{
public IActionResult Index()
{
ViewBag.data = new string[] { "BadmHennessey Venominton", "Bugatti
Chiron", "Bugatti Veyron Super Sport", "SSC Ultimate Aero",
"Koenigsegg CCR","McLaren F1", "Aston Martin One- 77", "Jaguar XJ220"
};
return View();
}
}
}
|
Could you please check the above details, and get back to us, if you need assistance on this.
Regards,
Aravinthan S