﻿<?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 - WebDesktop - How to create WebGridColumn at runtime</title><link>http://www.intersoftsolutions.com/Community/WebDesktop/How-to-create-WebGridColumn-at-runtime/</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 create WebGridColumn at runtime</title><link>http://www.intersoftsolutions.com/Community/WebDesktop/How-to-create-WebGridColumn-at-runtime/</link><pubDate>Fri, 11 Jun 2010 12:36:02 GMT</pubDate><dc:creator>handy@intersoftpt.com</dc:creator><category>Create WebGridColumn</category><category>runtime</category><description>&lt;p&gt;Hello Anup,&lt;/p&gt;&lt;p&gt;I have tested it but it runs well. What does that button click do? When PostBack, PrepareDataBinding would be always triggered. If that button only triggers postback, it supposed not creating a new column again. You should add if(!IsPostBack). &lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Handy&lt;/p&gt;</description></item><item><title>How to create WebGridColumn at runtime</title><link>http://www.intersoftsolutions.com/Community/WebDesktop/How-to-create-WebGridColumn-at-runtime/</link><pubDate>Thu, 10 Jun 2010 23:08:22 GMT</pubDate><dc:creator>AnupVasudeva</dc:creator><category>Create WebGridColumn</category><category>runtime</category><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;I was just trying to create WebGridColumns (&lt;strong&gt;Button column&lt;/strong&gt;) at runtime. I wrote the following code on &lt;strong&gt;WebGrid1_PrepareDataBinding event&lt;/strong&gt; :&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;strong&gt;WebGridColumn column = new WebGridColumn("NewCol", "NewCol", Unit.Pixel(80));&lt;br /&gt;column.Bound = true;&lt;br /&gt;column.Name = txtFieldName.Text;&lt;br /&gt;column.ColumnType = ColumnType.Button;&lt;br /&gt;column.ButtonText = "Hello Button";&lt;/strong&gt;&lt;strong&gt;&lt;br /&gt;BudgetGrid.RootTable.Columns.Add(column);&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;But the second time when i click the button, a new column does gets created sucessfully, but the previous Button column does not shows the caption of all the buttons. It only shows all buttons but with empty text in it.&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;Any comments would be really apprecaited.&lt;br /&gt;Thanks in advance.&lt;br /&gt;&lt;br /&gt;Anup Vasudeva&lt;br /&gt;</description></item></channel></rss>