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

How to make the grid pager's width fill 100%,means flow to right more closely?

1 Answer 62 Views
Grid
This is a migrated thread and some comments may be shown as answers.
xi
Top achievements
Rank 1
xi asked on 28 May 2013, 12:57 PM
I has a grid with many column,and I set the grid overflow-x:scroll,but it seems that that the pager not to automatic lengthening when I  drag to scroller? How to make the pager  flow to right more closely?

@(Html.Kendo().Grid(Model)

      .Name("StudentGrid")

      .Columns(columns =>

      {

        columns.Bound(p => p.Name).Title("Name").Width(200);

          columns.Bound(p => p.Age).Title("Age").Width(200);

       columns.Bound(p => p.Name).Title("Name").Width(200);

          columns.Bound(p => p.Age).Title("Age").Width(200);

      columns.Bound(p => p.Name).Title("Name").Width(200);

          columns.Bound(p => p.Age).Title("Age").Width(200);

        columns.Bound(p => p.Name).Title("Name").Width(200);

          columns.Bound(p => p.Age).Title("Age").Width(200);

      })

      .Navigatable()

      .Groupable()

      .Pageable()

      .DataSource(dataSource => dataSource

                                   
.Ajax()

                                   
.PageSize(50)

                                   
.Read(read => read.Action("GetStudentImfo", "Student"))



      ).AutoBind(false)

      .Resizable(resize => resize.Columns(true)))



and the css style:

#StudentGrid {
    overflow-x: scroll;
}

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 28 May 2013, 03:48 PM
Hello Xi,

The desired behavior should be achieved by enabling Grid scrolling, which creates a scrollable element and you don't have to apply additional styles.

Regards,
Dimo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
xi
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or