Size of filter in filter row

2 posts, 1 answers
  1. Daniel
    Daniel avatar
    6 posts
    Member since:
    Apr 2016

    Posted 16 Aug Link to this post

    Hello,

    is there a "kendo-way" to automatically set the size of the filter in a cell not smaller than the content in the cell,
    without having to explicitly set the width attribute?

    Thanks for your help,
    Daniel

  2. Answer
    Dimo
    Admin
    Dimo avatar
    8330 posts

    Posted 18 Aug Link to this post

    Hello Daniel,

    If I understand you correctly, you wish to achieve one of the following:

    a) make the filtering textbox as wide as the widest cell value in the respective column
    b) make the filtering textbox be as wide as its current content

    For (b), I am afraid there is no automatic way to do that.

    For (a), use one of the following techniques:

    1) auto fit the column, so that it expands, according to its widest value
    http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#methods-autoFitColumn

    2) disable Grid scrolling and text wrapping to make columns expand, according to their content
    http://docs.telerik.com/kendo-ui/controls/data-management/grid/how-to/Layout/auto-layout-grid

    .k-grid td
    {
        white-space: nowrap;
    }


    Regards,
    Dimo
    Telerik by Progress
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. UI for ASP.NET AJAX banner
Back to Top