namespace mvc_ej2
{
public class BundleConfig
{
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js"));
. . . . .
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/bootstrap.css",
"~/Content/site.css")); // need to remove the default site css
}
}
}
|
<style>
input, select, textarea {
max-width: 100% !important; // we have override and applied max-width as 100%
}
</style> |
<div class="form-row">
<div class="form-group col-md-6">
<div class="e-float-input e-control-wrapper">
@Html.TextBox("Contato ID")
<span class="e-float-line"></span>
@Html.Label("contato_id", "Contato ID", new { @class = "e-float-text e-label-top" })
</div>
</div>
<div class="form-group col-md-6">
<div="e-float-input e-control-wrapper"> // remove the div element.
@Html.EJS().DropDownList("customers").FloatLabelType(Syncfusion.EJ2.Inputs.FloatLabelType.Always).AllowFiltering(true).Width("300px").Placeholder("Select a customer").DataSource(obj =>
CrossDomain(true).Adaptor("ODataAdaptor")).Fields(newDropDownListFieldSettings
{ Text = "ContactName", Value = "CustomerID" }).Query((string)ViewBag.query).Render()
</div>
</div> |
function actionBegin(args) {
if (args.requestType === 'save') {
// cast string to integer value.
args.data['ClientID'] = parseFloat(args.form.querySelector("#ClientID").value);
}
} |