4 Answers, 1 is accepted
0

Kevin
Top achievements
Rank 1
answered on 04 Apr 2013, 05:35 PM
Seems like setting the column width on the grid definition causes this. Not sure why it only showed up on deployment first but that part seems to be resolved.
eg.
columns: [
{ field: "Account", title: "Account", width: 105 },
FYI: Grid is bound to a datasource that calls json webservice.
So setting the width works on the header but messes up the column width on the lines once data is loaded.
So how can I set column width properly so the data lines align with the header?
Need example for the following:
1. Setting fixed width column
2. Autosize columns based on data.
3. Minimum column width with autosize for loaded data lines.
In all cases the rendering of the lines should align properly to the column headers.
Can anyone help with this.
eg.
columns: [
{ field: "Account", title: "Account", width: 105 },
FYI: Grid is bound to a datasource that calls json webservice.
So setting the width works on the header but messes up the column width on the lines once data is loaded.
So how can I set column width properly so the data lines align with the header?
Need example for the following:
1. Setting fixed width column
2. Autosize columns based on data.
3. Minimum column width with autosize for loaded data lines.
In all cases the rendering of the lines should align properly to the column headers.
Can anyone help with this.
0
Hello Kevin,
Similar question for autosizing is covered here.
Basically you can leave columns with no width only if there is enough space for them to show up. For example, if you have a Grid that is 600px wide and 4 columns with 3 of them having widths of 100px, 200px, 300px, there will be no room for the fourth one. In this case you must set width to all columns, so that a horizontal scrollbar appears.
To get a better picture of your case and the question that you have I would suggest you to create an example so we can see what exactly you tried and where you struggle.
Kind Regards,
Petur Subev
the Telerik team
Similar question for autosizing is covered here.
Basically you can leave columns with no width only if there is enough space for them to show up. For example, if you have a Grid that is 600px wide and 4 columns with 3 of them having widths of 100px, 200px, 300px, there will be no room for the fourth one. In this case you must set width to all columns, so that a horizontal scrollbar appears.
To get a better picture of your case and the question that you have I would suggest you to create an example so we can see what exactly you tried and where you struggle.
Kind Regards,
Petur Subev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0

Steven
Top achievements
Rank 1
answered on 08 Oct 2015, 01:37 PM
I just had this problem. It is caused by the vertical scrollbar that appears when there is more than a page worth of data.
0
Hello Steven,
Could you please open a separate support request in which to provide a bit more details about your exact scenario and its implementation. A small runnable test page will be appreciated.
Regards,Rosen
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!