iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
After resizing the grid, the scrollbarHeight is set to 2px. How can I change this size?
This occurs in the table tbFreeze_[myGrid].tbody.tr.td.div
The div has the style attributes:
overflow-x: scroll;
overflow-y: hidden;
width: 100%;
height: 2px;
The markup appears as below:
Hello,
Currently, our WebGrid does not have a property to adjust scrollbar height or size. You only can change the size from the element.
Regards,Handy
How would I change the size from the element?
If I use CSS, it is overridden by the 2px on the DIV.
How does the height get set to 2px? Is there some math performed to determine the scrollbar height? If I refresh the frame, the height is correct (19px). Is there an initialization or cache setting that sets or stores the height?
Thank you.
Actually, it is a little weird. We never resize the scrollbar. It should be in 19px. So, perhaps you can send us a simple sample that replicates this issue. We need this to investigate the issue.
To set the css class, simply set className property.
example, document.getElementById("tbFreeze_grdProducts").childNodes[0].childNodes[0].childNodes[0].className = "[youclassname]";
Hi,
I am encountering similar problem, and I had tried Handy's suggestion in the different client side event, the scrollbar looks good at the beginning, but when I move to the splitter (mouseover event) of WebPane (the WebGrid is inside a WebPaneManager), the scrollbar's height returns to 2px again, I think need to redraw the WebGrid to solve this problem.
Is there any method (preferably client-side) to force the webgrid to redraw the UI? or Is there any way that I can force the scrollbar to have specific height without returning to 2px.
Thanks and Regards,
Fung
Hello Fung,
Can you send me a simple sample that replicates this issue? Please also let me know your current browser,e.g IE7 or IE8 ( please press F12 to see what is your current browser mode).
Hi Handy,
My current browser is IE8, and for the mode --> Browser Mode is IE8, Document Mode is Quirks (Page Default)
I am sorry that I am currently not able to have a simple sample for you to reproduce the issue yet. But I think I can summarize some common places for the issue, I hope these information can give you more clue about the issue.
Usually the issue will occurs when then WebGrid is placed inside a WebPane (with 2 Panes) after postback (WebPaneManager's Page??) , the horizontal scrollbar will shrink to 2px
I am having a similar screenshot as this case (I had already tried the solution of the issue but not work):
http://www.intersoftpt.com/Community/WebGrid/webgrid-scrollbar-sizing-issue/
(The first picture in the error.docx file)
Detailed Description of my case:
The Page is splited into two Panes horizontally, a WebTabManager (with serveral WebTabs of IFrame Mode) is placed in the lower Pane, the WebGrid is inside one of the WebTab (as IFrame). One of the page in the WebTab call a postback from the Upper Pane, and then a Dialog box is popup (using server-side code --> RegisterClientScript(Me.GetType, scripts))
After the Dialog box finished loading, Go back to the WebGrid's Tab, the horizontal scroll bar is shrinked. If I add your code to force the scrollbar to 19px when I change to the WebGrid's Tab page, it works, but then when my mouse is over the pane's splitter or webtab, the scrollbar will return to 2px again.
Thanks and regards,
Hi Fung,
Ok, thank you for your information. I will try to replicate the issue in here and investigate the issue. Please bear with me.
I "meet" the error (only once) today. I can provide a little bit more information for your reference, hope it's useful. I wonder if I had made any wrong settings for the grid to produce this error.
Attached IE's Javascript Error's (txt File) for your information.
I had opened the java script to investigate, and I found the code below caused the error:
1.
GetNode: function(v2ac57,v13867) { return v2ac57.selectSingleNode(v13867); }
The javascript error message from IE:
Message: 'null' is null or not an object
Line: 11
Char: 34285
Code: 0
URI: http://localhost/test/ISRes.axd?F/ISCore.js/305000757
2.
mba377: function (v6b124, v1ed69) { var v1eb97 = wg12a97.me1872(); for (var vfaa51 = 0; vfaa51 < v1eb97.length; vfaa51++) { var v3ef85 = v1eb97[vfaa51]; if (IS.ie) { if (v3ef85.LayoutSettings.AutoHeight) { v3ef85.NeedHeightResize = true; wgdbb18.me812(v3ef85.FrameObj.parentElement); } else { if (v3ef85.FrameObj.style.height != "") { if (v3ef85.FrameObj.style.height.indexOf("%") > 0) { v3ef85.CacheTBodyHeight = null; } } } if (v3ef85.LayoutSettings.AutoWidth) { v3ef85.NeedWidthResize = true; wgdbb18.m57818(v3ef85.FrameObj.parentElement); } var va807 = v3ef85.RootTable.GetElement(WG40.BODY, WG40.HTMLDIV); if (va807 != null && va807.scrollLeft > (va807.scrollWidth - va807.clientWidth - 17)) wg12a97.mb1921(v3ef85, null, null, true); } else { wgc4f62.m0cd54(v3ef85); wgc4f62.m8ae36(v3ef85); } if (v3ef85.LayoutSettings.AutoFitColumns && v3ef85.FrameObj.style.width.indexOf("%") >= 0) { if (v3ef85.TempResizeID != 0) clearTimeout(v3ef85.TempResizeID); setTimeout("wgdbb18.m79551('" + v3ef85.Name + "')", 500); } if (v3ef85.LayoutSettings.AllowColumnFreezing == "Yes") { wgdbb18.m82e93(v3ef85); } if (v6b124 && v3ef85.CacheTBodyHeight == null) { wgdbb18.m8e576(v3ef85.RootTable.GetElement(WG40.BODY, WG40.HTMLDIV), (IS.ie && IS.IsXHTMLDocType())); } } }
IE Javascript Error:
Message: Object required
Line: 9
Char: 30652
URI: http://localhost/test/ISRes.axd?G/WebGrid_Core.js/707200419
Hope my information is useful for your investigation.
Best Regards,
Greetings.
We have found a workaround for cases where Column Freezing is not required.
You must set the value AllowColumnFreezing="No" - the scrollbars are then rendered with the proper height.
If you don't set the value or you set AllowColumnFreezing="Yes", then the scrollbars are rendered with height=2px.
This does not help in cases where Column Freezing is required.
I am not sure if we are talking about the same issue in here. I think this javascript error refer into another issues. Please see my attached sample. I am using Two panes (upper and lower), WebTab (contains WebGrid). When click on PostBack button, the scrollbar does fine. So, perhaps you can help me to replicate the issue in my sample such as applying your settings or something.
So, I let this one go for a while, especially after Fung hijacked my original post, but the scrollbar height issue is appearing more frequently and is quite annoying.
I have finally found the piece of code where Intersoft sets the "ScrollBarHeight". (See attached image)I am assuming subtracting clientHeight from offsetHeight is zero (0), and adding the 2 is why my scrollbarheight = 2px.
The script (707200431 [dynamic]) in which the image below appears starts out with:
// Generated by Intersoft Script Optimizer V1.5 + Intersoft JS Engine MaxObfuscate(tm) V1.0 // Generated Datetime : 7/28/2011 1:07:04 PM // Copyright (c) 2005 Intersoft Solutions. // Unauthorized decryption/reproduction of any codes contained herein is strictly prohibited and will result in severe civil and criminal penalties . //**Start Encode** var WG40 = { COLHEADER: "CH", C...
I also found that I am not the only person having the issue that has posted to these boards. See here.
So, please let me know if there is a way I am able to set the scrollbar height or if there is a way to stop your code from modifying it.
Thanks.
Anyone looking at this?
Hello Frank,
Have you tried my sample in previous post? Your error message or screenshot does not help at all for us to investigate the issue. It only shows obfuscated script. At least, we need a runable sample that replicates the issue. Some special requirements might be needed to replicate this conditions. But we just could not find the pattern. That's why we need you to help us.
I showed you in the obfuscated code where you are setting the scrollbar height. You should be able to refer to the base code to find where you are setting this value.
You wrote back in March "We never resize the scrollbar" - obviously, this is not a true statement. The code should not be setting the height, but it is clear from the image that it does.
If I get time, I will attempt to recreate a sample project, but you now know this is an error in your code.
Yes, we know. We also appreciated that you showed the error to us. Perhaps, there is some conditions that force our script to resize the scollbar. This might be true, but we still not sure. We need to able to replicate the issue to see what is really happened.
Have you identified the source code that makes this occur?
Will there be a fix coming?
As I said before, we need to replicate the issue first before can investigate the issue in our code. If it works well in here, how should we know in what/which scenario that can make the issue?So, in here, we need your help as well.
You can't find the source code that sets the height? Is it possible for users to set the height? The source code should have the text "ScrollBarHeight", "offsetHeight", "clientHeight", and "+2".
"Perhaps, there is some conditions that force our script to resize the scollbar." - When would you set the scrollbar less than 19px (the default)?
The height should never end up being 2px - the scroller is near impossible to grab cleanly.
You can't find the source code that sets the height? Is it possible for users to set the height? The source code should have the text "ScrollBarHeight", "offsetHeight", "clientHeight", and "+2"."Perhaps, there is some conditions that force our script to resize the scollbar." - When would you set the scrollbar less than 19px (the default)?The height should never end up being 2px - the scroller is near impossible to grab cleanly.
As I said before, we never design the code to resize it to 2px. That's why we need to know in what condition that can make our code obsolote or not working.That's why we need your help to replicate the issue in sample. We need this to investigate and look up in the current part that you reported to us.
And in the image I posted on November 7, 2011, it clearly shows your obfuscated code performing a calculation on the scrollbarheight. The last section of that calculation adds 2 to the height. Clearly, there is a math problem in the code where the height is being calculated at less than 19px, and the code does not take that into account.
I understand about wanting to replicate the problem, but I do not have the time nor inclination to debug your code. A simple check of "if scrollbarheight < 19 then scrollbarheight = 19" would fix the problem.
We could not just add the code/logic just the way you suggested. Our developer teams need to manage it carefully. How if we put that code, it would break the others.Some of our codes have connection with our framework. The others control too.Implement the code fix without know what the cause would be bad. The other control might get troubled too. In other words, we have our infrastucture which needs to be set.Regards,Handy
Have you discovered the source or fixed this problem, yet?
The problem occurs in your code when you are "resizing" (the math is broken) - the height of the scrollbar should never be "2px". Since I am certain it will not be fixed (because it can't be found or replicated), will you at least tell me the last event that occurs before the screen is drawn or acted upon? I would like to insert the javascript in that event so I can set the height correctly.
As I said before, we could not just do it before we could just replicate it. So, once again, I hope you understand about this. I would personally once again ask our developer teams about this. But I could not promise anything. It would be better if you can also help us to replicate this issue. Is it easy to replicate this issue in a simple sample?
Will you at least tell me the last event in javascript that occurs before the screen is drawn or acted upon? I will set the height here.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname