﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - WebGrid Enterprise - Vertical scrollbar makes grid content inaccessible</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Vertical-scrollbar-makes-grid-content-inaccessible/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>Vertical scrollbar makes grid content inaccessible</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Vertical-scrollbar-makes-grid-content-inaccessible/</link><pubDate>Wed, 26 May 2010 23:50:33 GMT</pubDate><dc:creator>Glayaar</dc:creator><category>WebGrid</category><description>&lt;p&gt;In my test, I set a static height for each row (24px) since all the row is a single line row. If you are using multi row cell or other scenario in which the height for each row could be different, the workaround would be to iterate all the row and sum all the height, as you have done using jQuery. &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Vertical scrollbar makes grid content inaccessible</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Vertical-scrollbar-makes-grid-content-inaccessible/</link><pubDate>Wed, 26 May 2010 19:19:39 GMT</pubDate><dc:creator>Gmontes</dc:creator><category>WebGrid</category><description>&lt;p&gt;For some reason setHeight onAfterInitialize and setHeight OnAfterResponseProcess behave differently (they don't resize the grid to the same height). My solution for this was way overkill but worked, used jQuery selectors to get the rowcount and the height of the elements inside the grid.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Vertical scrollbar makes grid content inaccessible</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Vertical-scrollbar-makes-grid-content-inaccessible/</link><pubDate>Thu, 13 May 2010 23:41:32 GMT</pubDate><dc:creator>Glayaar</dc:creator><category>WebGrid</category><description>&lt;p&gt;Under such circumstances, you will need to use the OnAfterResponseProcess client side event handler. Based on the action name in the event handler you might need to invoke the resize height again.&lt;/p&gt;&lt;p&gt;Here is the modified snippet:&lt;/p&gt;&lt;pre&gt;function GridCustomResize(controlId)&lt;br /&gt;{&lt;br /&gt;    var wgScroll = ISGetObject(controlId);&lt;br /&gt;&lt;br /&gt;    if (IS.ie &amp;amp;&amp;amp; IS.GetIEVersion() == 7)&lt;br /&gt;    {&lt;br /&gt;        var tableElem = wgScroll.RootTable.GetElement(WG40.BODY, WG40.HTMLTABLE)&lt;br /&gt;        var totalRows = tableElem.getElementsByTagName('tr').length;&lt;br /&gt;&lt;br /&gt;        //70 is the status bar height&lt;br /&gt;        //22 is the height of a single row content&lt;br /&gt;        wgScroll.SetHeight((70 &amp;#43; (24 * totalRows)));&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function wgScroll_OnAfterInitialize(controlId)&lt;br /&gt;{&lt;br /&gt;    GridCustomResize(controlId);&lt;br /&gt;	&lt;br /&gt;	return true;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function wgScroll_OnAfterResponseProcess(controlId, actionName, lastRequestObject, xmlResponseObject)&lt;br /&gt;{&lt;br /&gt;	var wgScroll = ISGetObject(controlId);&lt;br /&gt;&lt;br /&gt;	switch (actionName)&lt;br /&gt;	{&lt;br /&gt;	    case "Paging":&lt;br /&gt;	        GridCustomResize(controlId);&lt;br /&gt;	        break;&lt;br /&gt;	}&lt;br /&gt;	&lt;br /&gt;	return true;&lt;br /&gt;}&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Vertical scrollbar makes grid content inaccessible</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Vertical-scrollbar-makes-grid-content-inaccessible/</link><pubDate>Wed, 12 May 2010 11:06:04 GMT</pubDate><dc:creator>Gmontes</dc:creator><category>WebGrid</category><description>&lt;p&gt;Hi Glenn,&lt;/p&gt;&lt;p&gt;This solution doesn't work for grids with paging, once I go to a different page the grid will resize (incorrectly) again and I'm sure that some operations requiring a flypostback (sorting, refreshing) will resize the grid as well.&lt;/p&gt;
&lt;p&gt;Try adding to the grid:&lt;/p&gt;
&lt;p /&gt;&lt;pre&gt;&amp;lt;LayoutSettings PagingMode="ClassicPaging" PagingSize="10"&amp;gt;
        &amp;lt;ClientSideEvents OnAfterInitialize="wgScroll_OnAfterInitialize" /&amp;gt;
    &amp;lt;/LayoutSettings&amp;gt;    &lt;/pre&gt;
&lt;p&gt; And on the DS:&lt;/p&gt;
&lt;p /&gt;
&lt;p /&gt;&lt;pre&gt;protected void InitScroll(object sender, ISNet.WebUI.WebGrid.DataSourceEventArgs e)
        {
            e.DataSource = new List&amp;lt;KeyValuePair&amp;lt;string, string&amp;gt;&amp;gt;()
            {
                new KeyValuePair&amp;lt;string, string&amp;gt;("Test", "Test"),
                new KeyValuePair&amp;lt;string, string&amp;gt;("Test", "Test"),
                new KeyValuePair&amp;lt;string, string&amp;gt;("Test", "Test"),
                new KeyValuePair&amp;lt;string, string&amp;gt;("Test", "Test"),
                new KeyValuePair&amp;lt;string, string&amp;gt;("Test", "Test"),
                new KeyValuePair&amp;lt;string, string&amp;gt;("Test", "Test"),
                new KeyValuePair&amp;lt;string, string&amp;gt;("Test", "Test"),
                new KeyValuePair&amp;lt;string, string&amp;gt;("Test", "Test"),
                new KeyValuePair&amp;lt;string, string&amp;gt;("Test", "Test"),
                new KeyValuePair&amp;lt;string, string&amp;gt;("Test", "Test"),
                new KeyValuePair&amp;lt;string, string&amp;gt;("Test", "Test"),
                new KeyValuePair&amp;lt;string, string&amp;gt;("Test", "Test"),
                new KeyValuePair&amp;lt;string, string&amp;gt;("Test", "Test"),
                new KeyValuePair&amp;lt;string, string&amp;gt;("Test", "Test"),
                new KeyValuePair&amp;lt;string, string&amp;gt;("Test", "Test")
            };
        }&lt;/pre&gt;
&lt;p&gt; Take a look at the grid behaviour on initial load and after paging. Is the ONLY solution giving it a fixed height?&lt;/p&gt;
&lt;p /&gt;</description></item><item><title>Vertical scrollbar makes grid content inaccessible</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Vertical-scrollbar-makes-grid-content-inaccessible/</link><pubDate>Mon, 10 May 2010 03:34:06 GMT</pubDate><dc:creator>Glayaar</dc:creator><category>WebGrid</category><description>&lt;p&gt;Based on my discussion with the developer regarding this issue, the issue is caused by improper standard implementation in IE 7.&lt;/p&gt;&lt;p&gt;A workaround in IE 7 would be to set the height manually during OnAfterInitialize event based on the WebGrid number of rows. Here is the snippet:&lt;/p&gt;&lt;pre&gt;function wgScroll_OnAfterInitialize(controlId)&lt;br /&gt;{&lt;br /&gt;	var wgScroll = ISGetObject(controlId);&lt;br /&gt;&lt;br /&gt;	if (IS.ie &amp;amp;&amp;amp; IS.GetIEVersion() == 7)&lt;br /&gt;	{&lt;br /&gt;	    var totalRows = parseInt(wgScroll.TotalRows);&lt;br /&gt;&lt;br /&gt;	    //70 is the status bar height&lt;br /&gt;	    //24 is the height of a single row content&lt;br /&gt;	    wgScroll.SetHeight((70 &amp;#43; (24 * totalRows)));&lt;br /&gt;	}&lt;br /&gt;	&lt;br /&gt;	return true;&lt;br /&gt;}&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Vertical scrollbar makes grid content inaccessible</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Vertical-scrollbar-makes-grid-content-inaccessible/</link><pubDate>Fri, 07 May 2010 12:02:00 GMT</pubDate><dc:creator>Gmontes</dc:creator><category>WebGrid</category><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I found an issue where the vertical scrollbar is showing up for no reason (the height should be calculated with the rowcount/pagingsize). This is making the grid content inaccessible. We have a grid with X width and several columns defined that go over that X... thus, requiring horizontal scrolling. &lt;/p&gt;
&lt;p&gt;My problem is... once I start adding records to the grid, the vertical scrollbar shows up and you can't get to the grid content (see attached file).&lt;/p&gt;
&lt;p&gt;See this definition&lt;/p&gt;
&lt;p /&gt;&lt;pre&gt;&amp;lt;ISNet:WebGrid ID="wgScroll" runat="server" OnInitializeDataSource="InitScroll" Width="500px" UseDefaultStyle="true" DefaultStyleMode="Win7"&amp;gt;
    &amp;lt;RootTable&amp;gt;
        &amp;lt;Columns&amp;gt;
            &amp;lt;ISNet:WebGridColumn Name="Test1" DataMember="Value" Width="100px" /&amp;gt;
            &amp;lt;ISNet:WebGridColumn Name="Test1" DataMember="Value" Width="100px" /&amp;gt;
            &amp;lt;ISNet:WebGridColumn Name="Test1" DataMember="Value" Width="100px" /&amp;gt;
            &amp;lt;ISNet:WebGridColumn Name="Test1" DataMember="Value" Width="100px" /&amp;gt;
            &amp;lt;ISNet:WebGridColumn Name="Test1" DataMember="Value" Width="100px" /&amp;gt;
            &amp;lt;ISNet:WebGridColumn Name="Test1" DataMember="Value" Width="100px" /&amp;gt;
            &amp;lt;ISNet:WebGridColumn Name="Test1" DataMember="Value" Width="100px" /&amp;gt;
        &amp;lt;/Columns&amp;gt;
    &amp;lt;/RootTable&amp;gt;
&amp;lt;/ISNet:WebGrid&amp;gt;&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p /&gt;
&lt;p&gt;And populate that grid with a single entry... something like:&lt;/p&gt;
&lt;p /&gt;&lt;pre&gt;protected void InitScroll(object sender, ISNet.WebUI.WebGrid.DataSourceEventArgs e)
        {
            e.DataSource = new List&amp;lt;KeyValuePair&amp;lt;string, string&amp;gt;&amp;gt;()
            {
                new KeyValuePair&amp;lt;string, string&amp;gt;("Test", "Test")                
            };
        }&lt;/pre&gt;
&lt;p&gt; I'm using IE7 with Webgrid 7.0.7200.401. How do I fix this? Can I just force it to remove the scrollbar? Will that make grid calculate the correct height?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Guillermo&lt;/p&gt;
&lt;p /&gt;</description></item></channel></rss>