﻿<?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 - scroll</title><link>http://www.intersoftsolutions.com/Community/Tags/scroll/</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>Webgrid screen scroll when use down arrow to exit edit</title><link>http://www.intersoftsolutions.com/Community/Tags/scroll/</link><pubDate>Wed, 23 Oct 2013 15:52:33 GMT</pubDate><dc:creator>luwen</dc:creator><category>WebGrid</category><category>scroll</category><description>&lt;p style="text-align:center"&gt;I use webgrid with layout setting &lt;span style="font-family: consolas; color: #ff0000; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #ff0000; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #ff0000; font-size: 13px"&gt;CellClickAction&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;="RowSelect" &lt;span style="color: #000000"&gt;and clienSideEvent "&lt;/span&gt;OnEditKeyDown"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I use down arrow to exit edit and move cursor to the same column next row. The grid has lots of rows and you can see the vertical scroll bar.  Now you edit a column in the first row of grid and press down arrow, the entire row is scrolled up and out of sight. How to make sure we can see the edited row when pressing the down arrow? &lt;/p&gt;
&lt;p&gt;Here is the code. &lt;/p&gt;&lt;pre&gt;function OnEditKeyDown(controlId) {

    var grid = ISGetObject(controlId);

    var selectedObject = grid.GetSelectedObject();
    var selectedRow = selectedObject.ToRowObject();

    if (selectedRow.Type == "FilterRow") {
        return true;
    }
    else if  (selectedRow.Type != "NewRow" &amp;amp;&amp;amp; (event.keyCode == "13" || event.keyCode == "40" || event.keyCode == "38")) {
                window.setTimeout(function () { grid.ExitEdit(1, 0, 0); }, 10);
                var nextRow = selectedRow.GetNextRow();
                if (nextRow != null) {
                    var ac = grid.GetActiveEditCell();
                    var curRow = ac.rowElement;
                    var tblElm = wgGetTable(curRow);
                    var curRowIndex = curRow.rowIndex;
                    var tbl = grid.Tables[ac.tblName];
                    var isParent = (tbl.GetChildTables().length &amp;gt; 0) ? true : false;
                    var i = (isParent) ? 2 : 1;
                    var nextRow =  event.keyCode == "38" ? curRowIndex - i: curRowIndex &amp;#43; i;
                    //check if current row is the last row of the table
                    if (nextRow &amp;gt;=0 &amp;amp;&amp;amp; nextRow &amp;lt; tblElm.rows.length ) {
                        //get destination now   
                        var destRow = wgGetRowByPosition(tblElm, nextRow);
                        //highlight the destination row       
                        //get the column name    
                        var cellName = wgGetColNameByCell(ac.element);
                        //get the destination cell    
                        var destCell = wgGetCellByName(destRow, cellName);

                        wgGetRowByElement(destRow).Select();
                        wgHighlightEditCell(destCell);
                    }
                }
                return false;
            }
         else { return true; }
    }&lt;/pre&gt;
&lt;span style="font-family: consolas; color: #0000ff"&gt;Thanks&lt;/span&gt;</description></item><item><title>WebGrid crashes when scrolling with column freeze and setting a column hidden</title><link>http://www.intersoftsolutions.com/Community/Tags/scroll/</link><pubDate>Fri, 08 Jan 2010 08:43:18 GMT</pubDate><dc:creator>Eric</dc:creator><category>freeze</category><category>crash</category><category>visible</category><category>column</category><category>hiding</category><category>scroll</category><category>PreRender</category><category>InitializeDataSource</category><category>InitializeLayout</category><description>&lt;p&gt;&lt;span style="font-size: 13px; color: #000000"&gt;&lt;span style="font-size: 13px; color: #000000"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000"&gt;&lt;span style="font-size: 13px"&gt;&lt;span style="font-size: 13px"&gt;I experience that WebGrid crashes, when the user horizontally scrolls. This happens only when I set the first column to be frozen. It also only happens when I set some columns to hidden (Visible=false).&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #000000"&gt;&lt;span style="font-size: 13px"&gt;&lt;span style="font-size: 13px"&gt;Attached is a simple sample in VB.NET for that (remove the .txt in the file names). Simplified, the sample contains:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;span style="color: #000000"&gt;&lt;span style="font-size: 13px"&gt;&lt;span style="font-size: 13px"&gt;An aspx file with the WebGrid "grdResult" and the columns "Description", "X1", "X2",..."X9"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: #000000"&gt;&lt;span style="font-size: 13px"&gt;&lt;span style="font-size: 13px"&gt;&amp;lt;FreezePaneSettings AbsoluteScrolling="true" ActiveFrozenColumns="1" MaxFrozenColumns="1" ShowSplitterLine="False" /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: #000000"&gt;&lt;span style="font-size: 13px"&gt;&lt;span style="font-size: 13px"&gt;In the aspx.vb code file there is a handler for InitializeDataSource which adds some static data to show, so that the grid is not empty&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: #000000"&gt;&lt;span style="font-size: 13px"&gt;&lt;span style="font-size: 13px"&gt;In the handler PreRender I change some column titles (from X1 to C1 etc.) and set two columns to Visible=False&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;span style="color: #000000"&gt;&lt;span style="font-size: 13px"&gt;&lt;span style="font-size: 13px"&gt;When scrolling, it crashes with: "Microsoft JScript runtime error: 'parentElement' is null or not an object" (Break/Continue/Ignore). The debugger then stands on this JScript code: "var v1d119 =vfcb75.parentElement" (and vfcb75 is null).&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #000000"&gt;&lt;span style="font-size: 13px"&gt;&lt;span style="font-size: 13px"&gt;I believe this is a bug in WebGrid. We are using the newest&amp;nbsp;WebGrid 6.0.7200.218 and Framework 3.0.5000.705 and the users use&amp;nbsp;Internet Explorer 6 to browse the page.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Can you confirm that this is a bug? If yes, will there be a hotfix available soon? Is there any workaround except not to use freezing or hiding?&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;</description></item></channel></rss>