This is a migrated thread and some comments may be shown as answers.

Size of filter in filter row

1 Answer 87 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 16 Aug 2016, 02:03 PM

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

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimo
Telerik team
answered on 18 Aug 2016, 09:24 AM
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!
Tags
Grid
Asked by
Daniel
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or