﻿<?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 - Select Columns</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Select-Columns/</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>Select Columns</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Select-Columns/</link><pubDate>Thu, 21 Jun 2012 23:57:05 GMT</pubDate><dc:creator>Hans</dc:creator><description>&lt;p /&gt;&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;You're welcome John.&lt;/p&gt;
&lt;p&gt;Please don't hesitate to ask me again, if you have another question.&lt;/p&gt;
&lt;p&gt;I would be happy to help you again.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Hans&lt;/p&gt;
&lt;p /&gt;</description></item><item><title>Select Columns</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Select-Columns/</link><pubDate>Thu, 21 Jun 2012 07:12:04 GMT</pubDate><dc:creator>John.Bonin@dot.gov</dc:creator><description>&lt;p&gt;Thank You, I will take a look shortly.  Am in a release process at the moment.&lt;/p&gt;</description></item><item><title>Select Columns</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Select-Columns/</link><pubDate>Mon, 18 Jun 2012 22:53:52 GMT</pubDate><dc:creator>Hans</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I’m sorry for this misunderstanding.&lt;br /&gt;You can still get all columns even if the column is hidden.&lt;br /&gt;I made a sample that maybe similar with your scenario.&lt;br /&gt;In my sample, I use WebButton to get all columns name and display it to TextBox.&lt;br /&gt;Here’s the snippet code in OnClientClick client side event:&lt;/p&gt;&lt;pre&gt;function WebButton1_OnClientClick(controlId, parameter) {
    var WebButton1 = ISGetObject(controlId);
    var WebGrid1 = ISGetObject("WebGrid1");
    var TextBox1 = document.getElementById("TextBox1");

    var columnLenght = WebGrid1.RootTable.Columns.length;

    for (var i = 0; i &amp;lt; columnLenght; i&amp;#43;&amp;#43;) {
        var columnName = WebGrid1.RootTable.Columns[i].Name;
        var columnVisibility = WebGrid1.RootTable.Columns[i].Visible;
        TextBox1.value = TextBox1.value &amp;#43; "Column Name: " &amp;#43; columnName &amp;#43; ";";
        TextBox1.value = TextBox1.value &amp;#43; " Column Visibility: " &amp;#43; columnVisibility &amp;#43; "; \n";
    }
            
    return true;
}
&lt;/pre&gt;
&lt;p&gt;I attached my sample as well.&lt;/p&gt;
&lt;p&gt;Hope this helps. Thank you.&lt;/p&gt;
&lt;p&gt;Regrads,&lt;br /&gt;Hans.&lt;/p&gt;</description></item><item><title>Select Columns</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Select-Columns/</link><pubDate>Mon, 18 Jun 2012 07:00:45 GMT</pubDate><dc:creator>John.Bonin@dot.gov</dc:creator><description>&lt;p&gt;Thanks Hans, &lt;/p&gt;
&lt;p&gt;     In this case I didn't want to get the value, but need to recreate the select columns menu due to a bug in the postioning of the context menu.  I need a way to get the names of all the columns and whether they are hidden or not when the table is created.&lt;/p&gt;</description></item><item><title>Select Columns</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Select-Columns/</link><pubDate>Mon, 18 Jun 2012 00:19:54 GMT</pubDate><dc:creator>Hans</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;To get the hidden column value, you could use “HiddenDataMember” column property of WebGrid.&lt;br /&gt;I made a sample to get the hidden column value. In my sample, I use Northwind.mdb database and Shipper table.&lt;/p&gt;
&lt;p&gt;I set visibility of Phone column to “False”.&lt;br /&gt;In ShipperID column, I set HiddenDataMember property to “Phone”.&lt;/p&gt;
&lt;p&gt;I use OnRowSelect client side event to get the hidden column value, then set the value to TextBox&lt;/p&gt;
&lt;p&gt;Here’s the snippet code in OnRowSelect client side event:&lt;/p&gt;&lt;pre&gt;function WebGrid1_OnRowSelect(controlId, tblName, rowIndex, rowEl) {
    var WebGrid1 = ISGetObject(controlId);
    var TextBox1 = document.getElementById("TextBox1");
    //get HiddenDataMember
    TextBox1.value = WebGrid1.GetSelectedObject().GetRowObject().GetCells().GetNamedItem("ShipperID").GetElement().attributes["Phone"].value;
    return true;
}&lt;/pre&gt;

&lt;p&gt;I attached the sample as well.&lt;/p&gt;
&lt;p&gt;Hope this helps. Thank you&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Hans.&lt;/p&gt;</description></item><item><title>Select Columns</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Select-Columns/</link><pubDate>Fri, 15 Jun 2012 14:47:22 GMT</pubDate><dc:creator>John.Bonin@dot.gov</dc:creator><description>&lt;p&gt;Hi,  Since there is a bug in how the context menu is shown, I need to create my own form to allow users to select from.  Is there a way to get all columns associated with the roottable and whether they are visible or not?  I tried in the InitializeColumn even but it only shows what is visible.  Can this be done client side and server side?&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;thanks&lt;/p&gt;</description></item><item><title>Select Columns</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Select-Columns/</link><pubDate>Tue, 12 Jun 2012 22:32:37 GMT</pubDate><dc:creator>Hans</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I’m really sorry for the inconvenience.&lt;br /&gt;But unfortunately, I have yet to get any update from our developer team about this issue.&lt;/p&gt;
&lt;p&gt;However I’ll let you know if there is any update for this issue.&lt;/p&gt;
&lt;p&gt;Thank you for your understanding.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Hans.&lt;/p&gt;</description></item><item><title>Select Columns</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Select-Columns/</link><pubDate>Tue, 12 Jun 2012 10:11:15 GMT</pubDate><dc:creator>John.Bonin@dot.gov</dc:creator><description>&lt;p&gt;Thanks, &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;  But the position of the ContextMenu is still off from an error I reported a while ago based upon the scrollbar location.  This is happening with the latest framework.  Any fix in the works?&lt;/p&gt;&lt;pre&gt;http://www.intersoftpt.com/Community/WebGrid/WebGrid-7-and-Framework-801-error/&lt;/pre&gt;</description></item><item><title>Select Columns</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Select-Columns/</link><pubDate>Mon, 11 Jun 2012 22:55:34 GMT</pubDate><dc:creator>Hans</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I’ve modified my sample by adding WebGrid’s OnColumnContextMenu client side event.&lt;br /&gt;On that event, I hide all menu item except “Select Column” menu item.&lt;br /&gt;Here’s the snippet OnColumnContextMenu client side event:&lt;/p&gt;&lt;pre&gt;function WebGrid1_OnColumnContextMenu(controlId, col, menu, isGroup, location) {
    var WebGrid1 = ISGetObject(controlId);
    var menuItemLength = menu.Items.length;

    for (var i = 0; i &amp;lt; menuItemLength; i&amp;#43;&amp;#43;) {
        var menuItemName = menu.Items[i].Name;
        if (menuItemName != "mnuSelectColumns") {
            menu.Items[i].Hide();
        }
    }
    return true;
}&lt;/pre&gt;

&lt;p&gt;I attached the modified sample as well.&lt;/p&gt;
&lt;p&gt;Thank you.&lt;br /&gt;Regards,&lt;br /&gt;Hans.&lt;/p&gt;</description></item><item><title>Select Columns</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Select-Columns/</link><pubDate>Mon, 11 Jun 2012 06:48:34 GMT</pubDate><dc:creator>John.Bonin@dot.gov</dc:creator><description>&lt;p&gt;Thanks Hans, but I don't want to show the entire context menu only the Select Columns menu.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item><item><title>Select Columns</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Select-Columns/</link><pubDate>Fri, 08 Jun 2012 11:36:46 GMT</pubDate><dc:creator>John.Bonin@dot.gov</dc:creator><description>&lt;p&gt;Just wondering is there a client side event that will show the Select Columns menu?  I need to have this menu shown when a button is clicked, users have problems with right-clicking on header to bring up context menu and then selecting "Select Coumns".  I know!&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;</description></item></channel></rss>