﻿<?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 - datatable</title><link>http://www.intersoftsolutions.com/Community/Tags/datatable/</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>Bind WebCombo with a DataTable as the DataSource</title><link>http://www.intersoftsolutions.com/Community/Tags/datatable/</link><pubDate>Wed, 11 Sep 2013 01:09:59 GMT</pubDate><dc:creator>siemiatkowski@softwarestudio.com.pl</dc:creator><category>WebCombo</category><category>datatable</category><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;I found this site with example:&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.intersoftpt.com/Support/WebCombo/KB/Various-WebCombo-Samples/"&gt;http://www.intersoftpt.com/Support/WebCombo/KB/Various-WebCombo-Samples/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color: rgb(247, 247, 247); color: rgb(63, 63, 63); font-family: 'lucida grande', 'segoe ui', arial, verdana, tahoma; font-size: 12px; line-height: 20px;"&gt;Bind WebCombo with a DataTable as the DataSource&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br style="font-family: 'lucida grande', 'segoe ui', arial, verdana, tahoma; color: rgb(63, 63, 63); font-size: 12px; line-height: 20px; background-color: rgb(247, 247, 247);" /&gt;&lt;span style="color: rgb(63, 63, 63); font-family: 'lucida grande', 'segoe ui', arial, verdana, tahoma; font-size: 12px; line-height: 20px; background-color: rgb(247, 247, 247);"&gt;WebCombo is bounded programmatically during runtime with a DataTable as the DataSource. The ComboMode configuration, DataTextField and DataValueField are all configured in InitializeLayout event.&lt;/span&gt;&lt;br style="font-family: 'lucida grande', 'segoe ui', arial, verdana, tahoma; color: rgb(63, 63, 63); font-size: 12px; line-height: 20px; background-color: rgb(247, 247, 247);" /&gt;&lt;a href="http://www.intersoftpt.com/Support/WebCombo/tdn/Downloads/BindDataTable.zip" style="font-family: 'lucida grande', 'segoe ui', arial, verdana, tahoma; text-decoration: none; font-size: 12px; line-height: 20px; background-color: rgb(247, 247, 247); color: rgb(22, 95, 167) !important;"&gt;Download Sample&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;but link download sample on this site not running correctly.&lt;/p&gt;
&lt;h2 style="font-family: 'lucida grande', 'segoe ui', arial, verdana, tahoma; margin: 0px 0px 0px -1px; padding: 3px 0px; font-size: 21px; font-weight: 400; line-height: 30px; color: rgb(63, 63, 63); background-color: rgb(247, 247, 247);"&gt;Opps...&lt;/h2&gt;
&lt;hr style="font-family: 'lucida grande', 'segoe ui', arial, verdana, tahoma; color: rgb(63, 63, 63); font-size: 0pt; line-height: 17px; background-color: rgb(247, 247, 247);" /&gt;
&lt;p style="font-family: 'lucida grande', 'segoe ui', arial, verdana, tahoma; line-height: 1.5em; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding: 0px; color: rgb(63, 63, 63); font-size: 12px; background-color: rgb(247, 247, 247);"&gt;We are sorry, but the page you are looking for cannot be found or has been removed from Intersoft Solutions web site.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Does anyone have an example program to connect a DataTable to WebCombo ?&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;I wrote a code that gives me control to the form, but when you try to display a list of records from a DataTable I get an error - the list of folders and files an application.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre&gt;ISNet.WebUI.WebCombo.WebCombo wc = new ISNet.WebUI.WebCombo.WebCombo();
wc.ID = "1";
wc.DataTextField = "tekst";
wc.DataValueField = "wartosc";
wc.DataSource = datatable;
wc.DataBind();
wc.LayoutSettings.AlwaysShowAllRowsOnDropdown = true;
            wc.LayoutSettings.StatusBoxVisible = false;&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;In attach files screens, &lt;/p&gt;
&lt;p&gt;error occurs when you want to display a list of records&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Remove column defined in aspx markup, from server-side</title><link>http://www.intersoftsolutions.com/Community/Tags/datatable/</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></channel></rss>