|
<h4>Numeric text box</h4>
<ejs-numerictextbox width="150px" id="TextValue" min="0" showSpinButton="false" decimals="2" validateDecimalOnType="true" value="@Model.TextValue" ejs-for="@Model.TextValue"></ejs-numerictextbox><br />
<h4>Checkbox</h4>
<ejs-checkbox id="chk1" ejs-for="@Model.value" value="@Model.value"></ejs-checkbox><br />
<h4>DropDown</h4>
<ejs-dropdownlist id="games" ejs-for="@Model.games" dataSource="@ViewBag.dropData" placeholder="Select a game" index="2" popupHeight="220px" width="200px" >
<e-dropdownlist-fields text="Game" value="Id"></e-dropdownlist-fields>
</ejs-dropdownlist>
<h4>Autocomplete</h4>
<ejs-autocomplete id="auto" ejs-for="@Model.auto" dataSource="@ViewBag.autoData" placeholder="e.g. Basketball" width="200px" >
</ejs-autocomplete><br /> |
|
public IActionResult Index()
{
InputValues obj = new InputValues();
obj.value = true;
obj.TextValue = 24;
ViewBag.dropData = new GameList().GameLists();
ViewBag.autoData = new string[] { "American Football", "Badminton", "Basketball", "Cricket", "Football", "Golf", "Hockey", "Rugby", "Snooker", "Tennis" };
return View(obj);
}
|