﻿<?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 - column</title><link>http://www.intersoftsolutions.com/Community/Tags/column/</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>Remove column defined in aspx markup, from server-side</title><link>http://www.intersoftsolutions.com/Community/Tags/column/</link><pubDate>Tue, 16 Apr 2013 16:03:03 GMT</pubDate><dc:creator>sinan.biondic@gmail.com</dc:creator><category>WebGrid</category><category>DataSource</category><category>Server-side</category><category>serverside</category><category>dynamically</category><category>column</category><category>remove</category><category>Unbound</category><category>DataBind</category><category>collection</category><category>datatable</category><category>PrepareDataBinding</category><category>aspx</category><category>server</category><category>side</category><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am trying to implement webgrid but the problem exists when I'm binding it to datasource. I have a stored procedure that returns some data.However, I don't know how many columns will be returned in that procedure, but I know the names of all columns that can be returned. So what I wanted to do, is to define all possible columns in aspx page, and in server-side PrepareDataBinding method remove columns from webgrid's column collection that don't have their match in datasource datatable that I'm binding it to.&lt;/p&gt;
&lt;p&gt;This doesn't really work as I get an error stating that columne "XYZ" which is defined in aspx can't be found in datasource, although it was removed (I checked with debugger) in PrepareDataBinding event handler.&lt;/p&gt;
&lt;p&gt;I presume this then is not possible, or am I wrong? The reason I am not creating columns from codebehind is simply that I would have to check datasource for every column to see if it exists and then create that column dynamically and add it to the column collection of webgrid. We did that in old version of our application and that PrepareDataBinding method has over 1600 lines of code, so I am looking for a better way of doing this. Please help me for the love of god!&lt;/p&gt;
&lt;p&gt;This is my PrepareDataBinding method (column named "Check" is rowchecker column so i don't want it removed):&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p /&gt;&lt;pre&gt;Dim dt As DataTable = CType(e.DataSource, DataTable)
 Dim grid As WebGrid = CType(sender, WebGrid)
 Dim colName As String
 For Each col As WebGridColumn In grid.RootTable.Columns
 colName = col.DataMember
 If Not colName = "Check" AndAlso Not dt.Columns.Contains(colName) Then
 grid.RootTable.Columns.Remove(col)
 End If
 Next&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p /&gt;
&lt;p /&gt;</description></item><item><title>Button in a column - Creates a null reference exception in prerender</title><link>http://www.intersoftsolutions.com/Community/Tags/column/</link><pubDate>Fri, 06 Apr 2012 15:42:25 GMT</pubDate><dc:creator>beyti77</dc:creator><category>WebGrid</category><category>column</category><category>PreRender</category><category>Button</category><category>databinding</category><category>null reference</category><description>&lt;p&gt;I have a button in a webgrid as a column and its code like below:&lt;/p&gt;
&lt;p /&gt;&lt;pre&gt;&amp;lt;ISWebGrid:WebGridColumn runat="server" Bound="False" ButtonAutoPostback="true" 
 Width="40px" EditType="NoEdit" ButtonText="qweqwe" DataMember="Id" DefaultValue="0"
 ButtonImage="/Style/Images/tick.png"  ColumnType="ButtonImage" NewRowEditType="NoEdit" 
 ButtonPostbackMode="OnTheFly" Name="Id"&amp;gt;&amp;lt;/ISWebGrid:WebGridColumn&amp;gt;&lt;/pre&gt;
&lt;p&gt; As you can see, I've tried all I can think of but none of them helped me.&lt;/p&gt;
&lt;p&gt;Problem is, when I create a new item in the grid; the item is created successfully but after the creation; a pop-up screen appears and says a null reference exception is occured in the data binding to the webgrid.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;When I remove the column, everything is ok.&lt;/p&gt;
&lt;p&gt;And when I don't remove the column, eventhough it says a null ref exception is occured; after a refreshing the screen; I can see the item is created successfully and including the newly created item, every item is bind into the webgrid.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;I would love if anybody could diect me into the right direction.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Info: The binding and the creation is by default and no override is included and linqdatasource is used for the data and given as a DataSourceId="dsSomething" in ascx page.&lt;/p&gt;
&lt;p /&gt;</description></item><item><title>WebGrid: disappearing columns and scrolling slider locked</title><link>http://www.intersoftsolutions.com/Community/Tags/column/</link><pubDate>Tue, 21 Dec 2010 05:24:16 GMT</pubDate><dc:creator>Eric</dc:creator><category>WebGrid</category><category>bug</category><category>crash</category><category>visible</category><category>column</category><category>slider</category><category>columns</category><category>locked</category><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have created a demo-project for you which shows the problems. Please see attached ZIP.&lt;/p&gt;
&lt;p&gt;Please include the Intersoft framework 3.0.5000.705, WebGrid 6.0.7200.220, System.Web.Extensions.dll 1.0.61231.0, AjaxControlToolkit.dll 1.0.10606.0, AJAXExtensionsToolbox.dll 1.0.61025.0 in order to get the same results. Please also set the .NET Target Framework to 2.0.&lt;/p&gt;
&lt;p&gt;To reproduce the problem:&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;select in the dropdown "ABC" and click refresh button&lt;/li&gt;&lt;li&gt;in the upper WebGrid make the first column wider (resize it)&lt;/li&gt;&lt;li&gt;click on any row in the upper WebGrid&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;Now the application crashes trying to access grdUpper.RootTable.Columns.GetNamedItem("D"). Please note that the first column is only set to Visible=false, never it's missing.&lt;/p&gt;
&lt;p&gt;Also, this only happens if the first column is resized. If not touching this, it works.&lt;/p&gt;
&lt;p&gt;As an additional bug, in the lower grid the slider to move between different pages doesn't work. Only the &amp;#43; and - buttons move the slider.&lt;/p&gt;
&lt;p&gt;My questions:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Can you confirm these two bugs?&lt;/li&gt;&lt;li&gt;Will there be a hotfix for it?&lt;/li&gt;&lt;li&gt;Do you know of any&amp;nbsp;workaround possible?&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Eric&lt;/p&gt;</description></item><item><title>Custom Column issue</title><link>http://www.intersoftsolutions.com/Community/Tags/column/</link><pubDate>Mon, 29 Nov 2010 04:06:12 GMT</pubDate><dc:creator>qq397472251</dc:creator><category>WebGrid</category><category>column</category><category>custom</category><description>&lt;p&gt;please See the picture below.&lt;/p&gt;
&lt;p&gt;After  webgrid executing init event, how can I custom  Cloum "Total",make&lt;br /&gt;&lt;strong&gt;Total=count*Unitprice&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (it&amp;nbsp; seems&amp;nbsp;like "Sql statement").&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Anyone can answer me?&lt;br /&gt;thank you!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>How to enable / disable freezing depending on data</title><link>http://www.intersoftsolutions.com/Community/Tags/column/</link><pubDate>Fri, 03 Sep 2010 09:41:51 GMT</pubDate><dc:creator>Eric</dc:creator><category>dynamically</category><category>freeze</category><category>crash</category><category>column</category><category>InitializeDataSource</category><category>frozen</category><category>Freeze Pane</category><category>enable</category><category>disable</category><category>scrollable</category><description>&lt;p&gt;There is a related sample in this thread: &lt;a href="http://www.intersoftpt.com/Community/WebGrid/WebGrid-crash-scrolling-freeze-column-hidden/"&gt;http://www.intersoftpt.com/Community/WebGrid/WebGrid-crash-scrolling-freeze-column-hidden/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;When I have no data for the grid, I want to hide all columns, create my own dataset add a row and write the text "no data" into this first row's first column. This is done in the InitializeDataSource event.&lt;/p&gt;
&lt;p&gt;In PreRender event I check if there is only this one row with this special text. If yes, I hide all columns (now works after you fixed the crash mentioned in the other thread).&lt;/p&gt;
&lt;p&gt;Problem is now that I cannot dynamically enable/disable the column freezing. For normal display, I want the first column to freeze (not modifiable by user). But when I hide all columns when no data is present, I get the error message "Freeze Pane cannot be activated on this column because it has exceeded the maximum size of scrollable viewport."&lt;/p&gt;
&lt;p&gt;I assume this is because there is nothing to show (message is probably slightly wrong). So I should disable the frozen columns in the PreRender event somehow. I couldn't get that working. Or leave freezing away in aspx page and enable it for normal data.&lt;/p&gt;
&lt;p&gt;In grid's LayoutSettings I have:&lt;/p&gt;&lt;span style="font-size: 13px; color: #0000ff"&gt;&lt;span style="font-size: 13px; color: #0000ff"&gt;
&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 13px; color: #a31515"&gt;&lt;span style="font-size: 13px; color: #a31515"&gt;FreezePaneSettings&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 13px"&gt; &lt;/span&gt;&lt;span style="font-size: 13px; color: #ff0000"&gt;&lt;span style="font-size: 13px; color: #ff0000"&gt;AbsoluteScrolling&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 13px; color: #0000ff"&gt;&lt;span style="font-size: 13px; color: #0000ff"&gt;="true"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 13px"&gt; &lt;/span&gt;&lt;span style="font-size: 13px; color: #ff0000"&gt;&lt;span style="font-size: 13px; color: #ff0000"&gt;ActiveFrozenColumns&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 13px; color: #0000ff"&gt;&lt;span style="font-size: 13px; color: #0000ff"&gt;="1"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 13px"&gt; &lt;/span&gt;&lt;span style="font-size: 13px; color: #ff0000"&gt;&lt;span style="font-size: 13px; color: #ff0000"&gt;MaxFrozenColumns&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 13px; color: #0000ff"&gt;&lt;span style="font-size: 13px; color: #0000ff"&gt;="1"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 13px"&gt; &lt;/span&gt;&lt;span style="font-size: 13px; color: #ff0000"&gt;&lt;span style="font-size: 13px; color: #ff0000"&gt;ShowSplitterLine&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 13px; color: #0000ff"&gt;&lt;span style="font-size: 13px; color: #0000ff"&gt;="False"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 13px"&gt; &lt;/span&gt;&lt;span style="font-size: 13px; color: #0000ff"&gt;&lt;span style="font-size: 13px; color: #0000ff"&gt;/&amp;gt; 

&lt;/span&gt;&lt;/span&gt;In PreRender I tried to disable these values without success. I also tried leaving the above tag away and adding these values in PreRender. 

&lt;p&gt;I also tried to set/change the value &lt;span style="font-size: 13px"&gt;grdResult.LayoutSettings.AllowColumnFreezing&lt;/span&gt;. But that caused WebGrid to crash in some JavaScript.&lt;/p&gt;
&lt;p&gt;How do I disable/enable column freezing depending on the data I have?&lt;/p&gt;</description></item><item><title>How to:get the value of a selected Column on serverside?</title><link>http://www.intersoftsolutions.com/Community/Tags/column/</link><pubDate>Mon, 16 Aug 2010 04:10:18 GMT</pubDate><dc:creator>qq397472251</dc:creator><category>serverside</category><category>column</category><description>&lt;p&gt;How to:get the value of a selected Column on serverside?&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Help!&lt;/p&gt;</description></item><item><title>how to:make "remove this column" enable in contextMenu (WebGrid )?</title><link>http://www.intersoftsolutions.com/Community/Tags/column/</link><pubDate>Tue, 10 Aug 2010 05:26:51 GMT</pubDate><dc:creator>qq397472251</dc:creator><category>WebGrid</category><category>column</category><category>remove</category><description>&lt;p&gt;how to:make "remove this column" enable in contextMenu (WebGrid )?&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Help me&lt;/p&gt;</description></item><item><title>how to:hide one column by Filter in WebGrid 7?</title><link>http://www.intersoftsolutions.com/Community/Tags/column/</link><pubDate>Mon, 09 Aug 2010 23:51:20 GMT</pubDate><dc:creator>qq397472251</dc:creator><category>column</category><category>hide</category><description>&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;how to:hide one column by Filter in WebGrid 7?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;&lt;/span&gt; &lt;/p&gt;
&lt;p&gt;help``&lt;/p&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/column/</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>