TtT23
TtT23

Reputation: 7030

Kendo grid prevent columns from being smaller

The grid has about 25 columns, and Kendo grid tries to fit all columns in one page horizontally, making the column names show as "...".

I'd like to show all column names by default and have a horizontal scrollbar enabled.

How can I achieve this with JSP wrapper?

<kendo:grid name="SRCHGT" resizable="true" sortable="true" height="500">
    <kendo:grid-scrollable virtual="true"/>
    <kendo:dataSource>
        <kendo:dataSource-transport>
            <kendo:dataSource-transport-read url="api/products"
                contentType="application/json" type="GET"></kendo:dataSource-transport-read>
        </kendo:dataSource-transport>
        <kendo:dataSource-schema data="Data" total="Total" groups="data">

        </kendo:dataSource-schema>
    </kendo:dataSource>

</kendo:grid>

Upvotes: 1

Views: 671

Answers (1)

Atanas Korchev
Atanas Korchev

Reputation: 30671

You need to specify the width setting of the columns in order to do that. Here is a demo showing horizontal scrolling: http://demos.kendoui.com/beta/web/grid/virtualization-remote-data.html

If you want all the columns the have the same width you can also use CSS:

#SRCHGT col {
    width: 100px;
}

Here is a live demo: http://jsbin.com/edinix/1/edit

Upvotes: 5

Related Questions