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

[Solved] Vertical scroll vs Horizontal scroll

3 Answers 232 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Paluth
Top achievements
Rank 1
Paluth asked on 29 Apr 2008, 05:18 PM
Hi,
Ive been having a problem with the following scenario. Ive got a Radgrid that fits the page in with. Some of the columns have fixed width, like dates and values, and some like names don't have widths. So I set the width of the grid to 100% in hope that the columns with no width have there size determined by the content, if they dont have enought space they can wrap or simply use the "..." in the end of the text. And if the content is too small, the remaining space should be distributed evenly among the columns that dont have widths. It seams that instead of that the widths are calculated simply using an expression similar to:
(container size - total fixed columns width)/# of columns that dont have widths.
So each of the columns with calculated widths receives that value of that expression so all of them have the same size and the content is not taken into account.
Althought I dont like that behavior I can live with that. But my real problem lies with the scrolling. Since I know the grid will fit in width, there should never be a horizontal scroll bar. But I need the contant not to be paged. The reason is that have sumeries in the footer, that are generated on the client, in real time as the grid values are edited, so all the data must be available in the client at any time, or else the summeries will only be valid for the page and thats not the indeed behavior for my bussiness rules. Having a page with limited size, I have  to set a scrollheight or a grid height and use the vertical scrolling in order to fit all the content. The problem happens when the data exceeds the height enabling vertical scroll. I expected the width of the scroll it self to be taken from all or one of the columns that dont have fixed widths. So that way the scroll would fit in the grid and not cause a horizontal scroll to show. Instead the grid displays the horizontal scroll width a scrolling space equals to the size of the vertical scrollbar. That is not intended to happen, and causes problem for the user to visualize the data since he has to be scrolling up and down and side to side to see the content. Now I can also live with this, its only realy anoing but its still usable.
Now the thing that I cant realy live with is that there is a bug in the code that generates the horizontal scroll when I have fixed headers. To me it doenst make any sense having vertical scroll without fixed headers since after scrolling to user is forced to remember what the columns stand for and when your working with a finacial application, as Im am right now, you simply have lots of value columns that look pretty much the same like:
name    05/02/08    45,345.45    5.4545,34    454.435.45    3,343.00

How is the user suposed to know what those values stand for?

So fixed header is a must. Having said that I will quickly describe the bug. The way I wanted the vertical scroll to show actualy happens when the header is fixed. Some columns that dont have fixed widths give space for the vertical bar. The problem is that the same doenst happen to the grid body. So the header fits the width, the body doesnt causing the columns not be allined with the headers. To make thing worst you can still scroll the body with the horizontal scroll, and that doesnt even bother the header since its already fiting to the width.

The bug is very easy to replicate. All you need to do is use a grid that fits the width and has enough rows to cause vertical scrolling. I dont know if have fixed and non fixed widths columns togather makes any diference. What I do know is that the bug is so easily replicated that it even show in the online demos.

http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/Client/VirtualScrollPaging/DefaultCS.aspx

Just look at the second grid in this demo. Move the horizontal scroll around.

Thank for reading, sory for the long message.

3 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 30 Apr 2008, 08:28 AM
Hi Paluth,

The horizontal scrollbar appears in Internet Explorer, this is a browser behavior. Please reduce the MasterTableView width a little, for example:

<telerik:RadGrid>
    <MasterTableView Width="95%" TableLayout="Fixed" />
</telerik:RadGrid>


All the best,
Dimo
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Paluth
Top achievements
Rank 1
answered on 30 Apr 2008, 12:40 PM
Im migrating to RadGrid "Promethous" and although we are still early in the application development we already have more than 60 grid through out the app, so we have many kinds of setups. So yesterday I was testing a page, and there where 2 grids in this page, side by side. There where configured diferently becouse the stuff that they where suposed to do where different. But imediatily I saw something strange yet good.One of the 2 grids had a vertical scrollbar and didnt have a horizontal one, the exact behavior I wanted. I then loaded the grids with less data to avoid vertical scroll from showing and both behaved fine. So I compared there code and got down to the reason why one of them was working. One had width="100%" in the grid but had no width in the mastetableview. The other (the one with the problem) had both widths set in the grid and in the mastertableview. So after I took out the width of the mastertableview from the problem grid it started working perfectly, as one would expect. And I test my app in ie 7 (sometimes I use firefox 2, but just to debug on client).
Now Ive taken out the widths in the mastertableviews of all my grids that have vertical scroll and fit to the page in width. Im happy with the result. There is still one serious problem when the grids are used inside modalpopupexternder which I have quite a few. Ive posted another thread for that issue but still got no answer.
Tnx for the reply.
0
Dimo
Telerik team
answered on 30 Apr 2008, 01:27 PM
Hi Paluth,

Thanks for the follow-up, I will keep this information in mind.

Sincerely yours,
Dimo
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
Paluth
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Paluth
Top achievements
Rank 1
Share this question
or