﻿<?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 hide a column on clientSide</title><link>http://www.intersoftsolutions.com/Community/WebGrid/how-to-hide-a-column-on-clientSide/</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 hide a column on clientSide</title><link>http://www.intersoftsolutions.com/Community/WebGrid/how-to-hide-a-column-on-clientSide/</link><pubDate>Wed, 10 Feb 2010 06:28:28 GMT</pubDate><dc:creator>julia</dc:creator><category>WebGrid</category><description>&lt;p&gt;Hi Vincenzo,&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Currently there is no method to change the position of WebGrid columns. However, you can do it manually from server-side by deleting the column first and then re-add the column into new position.&lt;/p&gt;
&lt;p&gt;If you want to request for this feature, please send your feedback to &lt;a href="http://dev2.intersoftpt.com/" target="_blank"&gt;Developer Network&lt;/a&gt; &amp;gt; Community Center &amp;gt; Product Feedback &amp;gt; Feature Request with details description on how this feature should be implemented.&lt;/p&gt;
&lt;p&gt;Please let me know if you need another help.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Julia&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item><item><title>how to hide a column on clientSide</title><link>http://www.intersoftsolutions.com/Community/WebGrid/how-to-hide-a-column-on-clientSide/</link><pubDate>Tue, 09 Feb 2010 03:16:17 GMT</pubDate><dc:creator>vangeloni</dc:creator><category>WebGrid</category><description>&lt;p&gt;Hi Julia,&lt;/p&gt;
&lt;p&gt;it could be fine if you can tell me how to change programmatically the position of a column.&lt;/p&gt;&lt;p&gt;Thanks,&lt;/p&gt;&lt;p&gt;Vince.&lt;/p&gt;</description></item><item><title>how to hide a column on clientSide</title><link>http://www.intersoftsolutions.com/Community/WebGrid/how-to-hide-a-column-on-clientSide/</link><pubDate>Fri, 05 Feb 2010 06:32:52 GMT</pubDate><dc:creator>julia</dc:creator><category>WebGrid</category><description>&lt;p&gt;Hi Vincenzo,&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Unfortunately it is the default behavior. As when you hide it, the column would be removed from the grid. When it being show again, it will render as new column and being placed in the last position.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Julia&lt;/p&gt;</description></item><item><title>how to hide a column on clientSide</title><link>http://www.intersoftsolutions.com/Community/WebGrid/how-to-hide-a-column-on-clientSide/</link><pubDate>Thu, 04 Feb 2010 10:21:38 GMT</pubDate><dc:creator>vangeloni</dc:creator><category>WebGrid</category><description>&lt;p&gt;Hi James,&lt;/p&gt;&lt;p&gt;I'm using your solution to hide and unhide a column. When the column appear is the last column of the grid. How can I have the column at the same place when I unhide it?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Vince.&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>how to hide a column on clientSide</title><link>http://www.intersoftsolutions.com/Community/WebGrid/how-to-hide-a-column-on-clientSide/</link><pubDate>Thu, 03 Sep 2009 05:19:39 GMT</pubDate><dc:creator>indra.anggala@gmail.com</dc:creator><category>WebGrid</category><description>&lt;p&gt;Thank you James. I've tried your solution. It works.&lt;/p&gt;</description></item><item><title>how to hide a column on clientSide</title><link>http://www.intersoftsolutions.com/Community/WebGrid/how-to-hide-a-column-on-clientSide/</link><pubDate>Wed, 02 Sep 2009 11:13:57 GMT</pubDate><dc:creator>james</dc:creator><category>WebGrid</category><description>&lt;p&gt;Hi Indra,&lt;/p&gt;&lt;p&gt;The following Javascript code will hide the column using Grid's built-in AJAX request.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;pre&gt;&amp;lt;script type="text/javascript"&amp;gt;
    
        function HideColumn()
        {
            var grid = ISGetObject("WebGrid1");
            var col = grid.RootTable.Columns.GetNamedItem("EmployeeID");
            
            col.Set("Visible", "false", true);
            grid.RefreshAll();
        }
        
    &amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;p&gt;This approach should be more solid since the Grid will re-initialize all settings after the column is removed.&lt;/p&gt;
&lt;p&gt;I hope it works for you. &lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;- James.&lt;/p&gt;</description></item><item><title>how to hide a column on clientSide</title><link>http://www.intersoftsolutions.com/Community/WebGrid/how-to-hide-a-column-on-clientSide/</link><pubDate>Wed, 02 Sep 2009 02:50:37 GMT</pubDate><dc:creator>indra.anggala@gmail.com</dc:creator><category>WebGrid</category><description>&lt;p&gt;I've tried the solutions. Well, it did hide the header, but not the data columns. Example, the columns are : &lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Employee&lt;/li&gt;&lt;li&gt;Date01&lt;/li&gt;&lt;li&gt;Date02&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;I would like to hide the "Date01" column. The solustions above will make the display like this :&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;Employee&lt;/span&gt;     &lt;span style="text-decoration:underline;"&gt;Date02&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Emp01         d01            d02&lt;/p&gt;
&lt;p&gt;Emp02         d01            d02&lt;/p&gt;
&lt;p&gt;Could you tell me if there is something else that I have to configure. By the way, I'm using WebGrid 7.0.7200.301 and IE 7.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;@James&lt;/p&gt;
&lt;p&gt;Could you show me how to hide the column through the FlyPostBack request?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;</description></item><item><title>how to hide a column on clientSide</title><link>http://www.intersoftsolutions.com/Community/WebGrid/how-to-hide-a-column-on-clientSide/</link><pubDate>Wed, 02 Sep 2009 00:38:32 GMT</pubDate><dc:creator>james</dc:creator><category>WebGrid</category><description>&lt;p&gt;FYI, although the solution above will work for display scenario, please be aware that it won't work very well when used in editing scenario, especially during keyboard navigation. It also won't work properly with Column Freezing enabled.&lt;/p&gt;&lt;p&gt;The best and suggested way to hide/remove a column is through a FlyPostBack request, so that will ensure the Grid to take account all settings properly when editing and other advanced features are used.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>how to hide a column on clientSide</title><link>http://www.intersoftsolutions.com/Community/WebGrid/how-to-hide-a-column-on-clientSide/</link><pubDate>Tue, 01 Sep 2009 23:47:20 GMT</pubDate><dc:creator>gordont</dc:creator><category>WebGrid</category><description>&lt;blockquote&gt;&lt;p&gt;Hi Gordon&amp;nbsp;,&lt;/p&gt;&lt;p&gt;is this solution Works With Nested Grid&amp;nbsp; &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Hi Koby,&lt;/p&gt;
&lt;p&gt;For hierarchical grid you need to use this code:&lt;/p&gt;&lt;pre&gt;function HideHierarchicalColumn(pos)
        {
            var grid = ISGetObject("WebGrid1");
            var table = grid.GetRootTable();

            headerGroup = table.GetElement(WG40.COLHEADER, WG40.HTMLDIV);
            colGroup = table.GetElement(WG40.COLGROUP, WG40.HTMLDIV);

            headerGroup.childNodes[0].childNodes[0].childNodes[0].childNodes[pos].style.display = (headerGroup.childNodes[0].childNodes[0].childNodes[0].childNodes[pos].style.display == 'none') ? '' : 'none';
            colGroup.childNodes[pos].style.display = (colGroup.childNodes[pos].style.display == 'none') ? '' : 'none';

            if (!IS.ie)
            {
                rowList = colGroup.nextSibling.childNodes;

                for (var i = 0; i &amp;lt; rowList.length; i&amp;#43;&amp;#43;)
                {
                    if (rowList[i].childNodes[pos])
                    {
                        rowList[i].childNodes[pos].style.display = rowList[i].childNodes[pos].style.display == 'none' ? '' : 'none';
                    }
                }
            }
        }&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Gordon Tumewu&lt;/p&gt;</description></item><item><title>how to hide a column on clientSide</title><link>http://www.intersoftsolutions.com/Community/WebGrid/how-to-hide-a-column-on-clientSide/</link><pubDate>Tue, 01 Sep 2009 23:35:51 GMT</pubDate><dc:creator>gordont</dc:creator><category>WebGrid</category><description>&lt;p&gt;Hi Vince,&lt;/p&gt;
&lt;p&gt;After discussing with my colleague, he help me with additional code so this will works in all browser. This is the complete code:&lt;/p&gt;&lt;pre&gt;function HideColumn(pos)
        {
            var grid = ISGetObject("WebGrid1");
            var table = grid.GetRootTable();
            
            headerGroup = table.GetElement(WG40.COLHEADER, WG40.HTMLDIV);   
            colGroup = table.GetElement(WG40.COLGROUP, WG40.HTMLDIV);
            
            headerGroup.childNodes[0].childNodes[0].childNodes[0].childNodes[pos].style.display = (headerGroup.childNodes[0].childNodes[0].childNodes[0].childNodes[pos].style.display == 'none') ? '' : 'none';
            colGroup.childNodes[pos].style.display = (colGroup.childNodes[pos].style.display == 'none') ? '' : 'none';

            if (!IS.ie)
            {
                rowList = colGroup.nextSibling.childNodes;

                for (var i = 0; i &amp;lt; rowList.length; i&amp;#43;&amp;#43;)
                {
                    rowList[i].childNodes[pos].style.display = rowList[i].childNodes[pos].style.display == 'none' ? '' : 'none';
                }
            }
        }&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Gordon Tumewu&lt;/p&gt;</description></item><item><title>how to hide a column on clientSide</title><link>http://www.intersoftsolutions.com/Community/WebGrid/how-to-hide-a-column-on-clientSide/</link><pubDate>Sun, 30 Aug 2009 04:32:56 GMT</pubDate><dc:creator>vangeloni</dc:creator><category>WebGrid</category><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;could you tell me how to hide a column on clientSide, and also to reset it to visible? &lt;br /&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Thanks, &lt;br /&gt;&lt;/p&gt;
&lt;p&gt; &lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Vince &lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>