Combobox Width Problem

2 posts, 0 answers
  1. artuimen
    artuimen avatar
    3 posts
    Member since:
    Apr 2014

    Posted 28 Sep 2015 Link to this post

    Hello,
     I want to change combobox width but I have problem with ​styling. I attached screen capture, I tried two way for set combo width but not working well. I using bootstrap in my project. How can I fix this problem?

    Here is my code,

    <div class="form-group">
                @Html.LabelFor(model => model.MusteriId, htmlAttributes: new { @class = "control-label col-md-2" })
                <div class="col-md-10">              
                    @(Html.Kendo().ComboBox()
              .Name("MusteriId")
              .Filter("contains")
              .Placeholder("Müşteri seçiniz...")
              .BindTo(ViewBag.MusteriId as SelectList)
              .Suggest(true)
              .HtmlAttributes(new { style = "width: 600px;" })
                    )
                    @Html.ValidationMessageFor(model => model.MusteriId, "", new { @class = "text-danger" })
                </div>
            </div><div class="form-group">
                @Html.LabelFor(model => model.AracId, htmlAttributes: new { @class = "control-label col-md-2" })
                <div class="col-md-10">               
                    @(Html.Kendo().ComboBox()
              .Name("AracId")
              .Filter("contains")
              .Placeholder("Araç seçiniz...")
              .BindTo(ViewBag.AracId as SelectList)
              .Suggest(true)
              .HtmlAttributes(new { style = "width: 85%;" })
                    )
                    @Html.ValidationMessageFor(model => model.AracId, "", new { @class = "text-danger" })
                </div>
            </div>
  2. artuimen
    artuimen avatar
    3 posts
    Member since:
    Apr 2014

    Posted 28 Sep 2015 Link to this post

    I fix it, in default asp.net mvc project template have site.css and its have 

    input,
    select,
    textarea {
        max-width: 280px;
    }

    I delete it and fixed.​

  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top