Kendo Multiselect changes page layout

3 posts, 0 answers
  1. Rui
    Rui avatar
    17 posts
    Member since:
    Jun 2017

    Posted 17 Jul Link to this post

    I have a page with a Kendo grid and several controls (picture 1).

    It works fine, no problem here. I now have to replace the dropdownlist that is open in the picture with a multiselect.

    After I changed the drop to a multi, which works just fine, something strange happened ( picture 2).

    The layout is all messed up and the grid stopped working.

    I change it back to drop and everything is back to normal.

    The code for the drop is

     

    @(Html.Kendo().DropDownList()

    .Name("Name")

    .OptionLabel("Select something...")

    ...

    ..BindoTo(new List>SelectListItem>

    {

    ...

    }}))

     

    The code for the multiselect is

    @(Html.Kendo.MultiSelect()

    .Name("Something")

    .PlaceHolde("Select something...")

    ...

    .BindTo(new List<SelectListItem>

    {

    ...

    }}))

     

    Any ideas?

  2. Ivan Danchev
    Admin
    Ivan Danchev avatar
    1325 posts

    Posted 19 Jul Link to this post

    Hello Rui,

    With regard to the change in layout when replacing the DropDownList with a MultiSelect, this is due to
    The MultiSelect having a display: block style set by default. If you want to place it on the same line next to the DropDownLists you can use the following CSS rule:
    .k-widget.k-multiselect{
        width: 200px;
        vertical-align: middle;
        display: inline-block;
    }

    As for the described effect it has on the Grid, this is not a known issue. We would suggest checking out whether there are any js exceptions on the page, if the name of the MultiSelect is already used by another widget, whether the Grid's dataBound event fires as expected.

    Regards,
    Ivan Danchev
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Rui
    Rui avatar
    17 posts
    Member since:
    Jun 2017

    Posted 27 Jul Link to this post

    Yep, that works just fine. Tks
Back to Top