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

Losing columns when scrolling /w frozen column and static headers

5 Answers 78 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 2
Alex asked on 08 Oct 2010, 06:27 PM
Losing the last 6 columns on a grid that has 42 columns (I know it's a lot but what can I do the user wants it like that) when I use scrolling with the 1st column frozen and static headers.

The scrolling works but I can't scroll all the way to the right so we can't see the last 6 columns, this is really a simple grid.

The 42 columns are TemplateColumns and all have a textbox in them.

At the moment I have a workaround by adding 7 bogus columns that have nothing in them. What this does is I can't see the last 6 columns but because they are fake columns I don't care.

I am using 2010.2 929 of the controls.

Please note that I currently have ticket open dated May 2008 for this issue (with a test project). Just hoping that someone has found out why this is happening when the number of columns is large (note I do not have this issue if the number of columns is like 10 or so).

Thanks as always.

5 Answers, 1 is accepted

Sort by
0
Cori
Top achievements
Rank 2
answered on 08 Oct 2010, 06:36 PM
Hello Alex,

Some of the tips I was given, when using FrozenColumns, were these:

1. Ensure that the non-frozen columns fit inside the available space. So setting the all the column width's to fixed one.
2. Ensure the height is fixed, for vertical scrolling.

So if you do that, it should work somewhat correctly, as long as you don't scroll to left very fast. I pretty much set a default HeaderStyle width, to ensure all the non-frozen columns are the same and fit within the available space left for them in the grid. So to figure out the right width to add, just set it to 100px and then view it in the browser. If the rows look properly aligned, meaning the far right column's right side looks like it's inside the grid, then the width for be good for the rest of the columns. Otherwise keep repeating until you find the right width.

The point to remember is that the non-frozen columns can't have their own special widths on them, only the frozen columns can.

I hope that helps.
0
Alex
Top achievements
Rank 2
answered on 08 Oct 2010, 06:55 PM
Cori,

Thanks I will make sure that the columns are the same width, the height is the same I did notice that if the height wasn't the grid would jerk when scrolling.

I do believe that having the columns being the same width bay pose a problem (not for this one though), in other pages/projects we do have grids where we have either a descriptive column or a comment column where the width of those columns are usually wider then the norm.

You're comment on scrolling fast reminded me of something:

If we do scroll fast (like really fast wanting to go to the last column) a javacript error occurs and it looks like it's coming from a dynamic telerik resouce.

Thanks
0
Alex
Top achievements
Rank 2
answered on 08 Oct 2010, 07:12 PM
OK here's what I've done:

1) Header has a specific height (enough to accommodate the text without having the header change height when scrolling)
2) Have all the textboxes width the same (no width tag avail on the TemplateColumn)
3) Itemstyle and Alternatingstyle same height

WIth that I tested and still can't get the last 6 columns to scroll.

Let me know if I should be changing the width/height on something else.

Thanks
0
Accepted
Pavlina
Telerik team
answered on 11 Oct 2010, 07:59 AM
Hello Alex,

Note, that when scrolling is enabled and UseStaticHeaders is True, the grid columns should declare HeaderStyle.Width. Please have in mind that it is not recommended to use ItemStyle.Width to set column widths. Additionally, can you please check whether setting fixed widths for your grid columns and TableLayout = Fixed for the MasterTableView makes a difference?

Moreover, this problem is resolved in the Q2 2010 version of RadControls for ASP.NET AJAX.

Regards,
Pavlina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Alex
Top achievements
Rank 2
answered on 11 Oct 2010, 05:18 PM
Pavlina,

Thanks this seems to have fixed my column issues.
Tags
Grid
Asked by
Alex
Top achievements
Rank 2
Answers by
Cori
Top achievements
Rank 2
Alex
Top achievements
Rank 2
Pavlina
Telerik team
Share this question
or