﻿<?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 - How to maintain Scroll Postion after postback caused by controls other than selfreferencing grid</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-to-maintain-Scroll-Postion-after-postback-caused-by-controls-other-than-selfreferencing-grid/</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>How to maintain Scroll Postion after postback caused by controls other than selfreferencing grid</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-to-maintain-Scroll-Postion-after-postback-caused-by-controls-other-than-selfreferencing-grid/</link><pubDate>Tue, 18 May 2010 22:38:38 GMT</pubDate><dc:creator>Glayaar</dc:creator><category>Maintain Webgrid ScrollPostion State</category><description>&lt;p&gt;In my test, it seems in Safari and Firefox browser, during body onload the content WebGrid height has not been set correctly so the ScrollTop assigment fails. You will need to use the setTimeout function to let the WebGrid set the proper height in order to set ScrollTop property.&lt;/p&gt;&lt;p&gt;Here is the modified snippet, in my test a delay of 10ms will be enough to properly set the ScrollTop correctly:&lt;/p&gt;&lt;pre&gt;function body_OnLoad()&lt;br /&gt;{&lt;br /&gt;    var strCook = document.cookie;&lt;br /&gt;    if (strCook.indexOf("!~") != 0)&lt;br /&gt;    {&lt;br /&gt;        var intS = strCook.indexOf("!~");&lt;br /&gt;        var intE = strCook.indexOf("~!");&lt;br /&gt;        var strPos = strCook.substring(intS &amp;#43; 2, intE);&lt;br /&gt;&lt;br /&gt;        var grid = ISGetObject("wgTest");&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: rgb(255, 0, 0);"&gt;setTimeout(function()&lt;br /&gt;        {&lt;br /&gt;            grid.RootTable.GetElement(WG40.BODY, WG40.HTMLDIV).scrollTop = strPos;&lt;br /&gt;        }, 10);&lt;/span&gt;&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;}&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>How to maintain Scroll Postion after postback caused by controls other than selfreferencing grid</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-to-maintain-Scroll-Postion-after-postback-caused-by-controls-other-than-selfreferencing-grid/</link><pubDate>Tue, 18 May 2010 10:39:12 GMT</pubDate><dc:creator>desaigs81</dc:creator><category>Maintain Webgrid ScrollPostion State</category><description>&lt;p&gt;&lt;span style="font-size: 10pt; font-family: 'lucida sans unicode','sans-serif'"&gt;Hello Glenn,
&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 10pt; font-family: 'lucida sans unicode','sans-serif'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thanks for your kind support. I have tried the solution provided by you in this thread for maintaining grid scroll position. I have implemented same in MOSS 2007 web part. My Issue is that it is working perfectly fine in IE browser, but the same solution is not working for Mozilla and safari. 
&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 10pt; font-family: 'lucida sans unicode','sans-serif'"&gt;&amp;nbsp;
&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 10pt; font-family: 'lucida sans unicode','sans-serif'"&gt;I have created sample web site and added the sample pages attached in this thread.&amp;nbsp; I tried to run&amp;nbsp;the sample page from IE, Mozilla and Safari browsers. The result is same as with my MOSS 2007 web part, Its work fine for IE but not for Mozilla and safari. 
&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 10pt; font-family: 'lucida sans unicode','sans-serif'"&gt;Will you please check the same at your end and provide&amp;nbsp;me the solution ASAP? 
&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 10pt; font-family: 'lucida sans unicode','sans-serif'"&gt;We have delivery in this week and it is delayed due to this issue. Please consider this issue for priority work.
&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 10pt; font-family: 'lucida sans unicode','sans-serif'"&gt;Waiting for your kind reply.
&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 10pt; font-family: 'lucida sans unicode','sans-serif'"&gt;Thanks,
&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 10pt; font-family: 'lucida sans unicode','sans-serif'"&gt;G.S 
&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-align:left"&gt;&lt;/p&gt;
&lt;p style="text-align:left"&gt; &lt;/p&gt;
</description></item><item><title>How to maintain Scroll Postion after postback caused by controls other than selfreferencing grid</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-to-maintain-Scroll-Postion-after-postback-caused-by-controls-other-than-selfreferencing-grid/</link><pubDate>Fri, 19 Mar 2010 00:35:55 GMT</pubDate><dc:creator>Glayaar</dc:creator><category>Maintain Webgrid ScrollPostion State</category><description>&lt;p&gt;Similar to the Maintaining scroll position walkthrough, in order to achieve this you will need to buffer the scrolltop position during onScroll client side event.&lt;/p&gt;&lt;p&gt;One of the simplest method would be using a cookie to buffer the value, as shown in this &lt;a target="_blank" href="http://radio.javaranch.com/pascarello/2005/07/18/1121709316718.html"&gt;post&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;Attached is the simple sample used to demonstrate such scenario.&lt;/p&gt;
&lt;p&gt;Since WebGrid still could not persist selef reference state after postback, in a self refrence scenario this method might fail to set the scrolltop position correctly.  &lt;br /&gt;&lt;/p&gt;</description></item><item><title>How to maintain Scroll Postion after postback caused by controls other than selfreferencing grid</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-to-maintain-Scroll-Postion-after-postback-caused-by-controls-other-than-selfreferencing-grid/</link><pubDate>Thu, 18 Mar 2010 03:09:51 GMT</pubDate><dc:creator>desaigs81</dc:creator><category>Maintain Webgrid ScrollPostion State</category><description>&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt; text-align: justify"&gt;&lt;span style="font-size: 15px; font-family: calibri"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 15px; font-family: calibri"&gt;Hello,&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal" style="margin: 0in 0in 10pt; text-align: justify"&gt;&lt;span style="font-size: 15px"&gt;&lt;span style="font-family: calibri"&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;We are using Webgrid7 for displaying self heretical data in SharePoint web part. We do have other controls placed outside of grid, which cause post back of page. The post back causes the scroll position to be set on the top for the grid. We need to maintain the scroll position to last selected record in grid after the post back. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt; text-align: justify"&gt;&lt;span style="font-size: 15px; font-family: calibri"&gt;We have tried following example from webgrid documentation:&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt; text-align: justify"&gt;&lt;span style="background: #d4dfff"&gt;&lt;span style="font-size: 15px; font-family: calibri"&gt;Walkthrough: Maintaining scroll position&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt; text-align: justify"&gt;It seems it will work fine if postbacks occures due to grid's internal action....&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt; text-align: justify"&gt;anybody can help me to get it resolved?&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt; text-align: justify"&gt;Waiting for reply....... &lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt; text-align: justify"&gt;Thanks &amp; Regards.&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt; text-align: justify"&gt;G.S&lt;/p&gt;</description></item></channel></rss>