﻿<?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 - DataSource</title><link>http://www.intersoftsolutions.com/Community/Tags/DataSource/</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/DataSource/</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>Problem Export DataSource</title><link>http://www.intersoftsolutions.com/Community/Tags/DataSource/</link><pubDate>Wed, 11 Apr 2012 07:34:04 GMT</pubDate><dc:creator>pujatolon@gmail.com</dc:creator><category>DataSource</category><category>export</category><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;When I try to export data from a WebGrid that it's datasource is a datatable in code behind, it appears the screen that is in atachment.&lt;/p&gt;
&lt;p&gt;If I try to export data from a WebGrid whith an aspdatasource (like in demo example), it works.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Can you please, say to me how can I fixed this problem?&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;</description></item><item><title>Tie WebFileUploader into DB?</title><link>http://www.intersoftsolutions.com/Community/Tags/DataSource/</link><pubDate>Fri, 11 Feb 2011 15:29:07 GMT</pubDate><dc:creator>jonathan.fischer@codelynx.com</dc:creator><category>WebTextEditor</category><category>WebFileUploader</category><category>DataSource</category><description>&lt;p&gt;I have a need to upload files into a database, where they will be stored and searched on.  They will also be linked to other items in the database.  My question is, how do I do this in WebFileUploader?  Is it even possible?  I have created a SQLDataSource and bound it to a table.  Now, I just need to get WebFileUploader to upload files into it.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Thank you!&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Jonathan Fischer, MBA&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>MySql DataSource for Web Scheduler</title><link>http://www.intersoftsolutions.com/Community/Tags/DataSource/</link><pubDate>Fri, 13 Nov 2009 06:20:03 GMT</pubDate><dc:creator>minococciolo</dc:creator><category>DataSource</category><category>web scheduler</category><category>mysql</category><description>&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;I would like to know if I could specify a MySql datasource for a web scheduler. I tried to generate a simple web scheduler with a ISDatasource and with just events binding, but it generates a long error server page. The code is:&lt;/p&gt;&lt;pre&gt;&amp;lt;ISWebScheduler:WebScheduler ID="WebScheduler1" runat="server" Height="100%" Width="100%"&lt;br /&gt;        DataSourceID="SqlDataSource1" EventsDataMember="appuntamenti"&amp;gt;&lt;br /&gt;        &amp;lt;ViewSettings SelectedDate="03/01/2008 08:00:00" SelectedViewMode="Month"&amp;gt;&lt;br /&gt;            &amp;lt;QuarterView Enabled="True" /&amp;gt;&lt;br /&gt;        &amp;lt;TimelineView DateHeaderMode="DateNumber"&amp;gt;&amp;lt;/TimelineView&amp;gt;&lt;br /&gt;        &amp;lt;/ViewSettings&amp;gt;&lt;br /&gt;        &amp;lt;DataBinding&amp;gt;&lt;br /&gt;            &amp;lt;EventsBinding EventIDField="IdAppuntamento"&lt;br /&gt;             SubjectField="Motivazione"/&amp;gt;&lt;br /&gt;        &amp;lt;/DataBinding&amp;gt;&lt;br /&gt;        &amp;lt;ImagesSettings BlackRecurrence="BlackRecurrence.gif" BlackRecurrenceException="BlackRecurrenceException.gif"&lt;br /&gt;            BlackReminder="BlackReminder.gif" /&amp;gt;&lt;br /&gt;&lt;br /&gt;        &amp;lt;DefaultResource ResourceColor="#D96666" ResourceName="Default"&amp;gt;&amp;lt;/DefaultResource&amp;gt;&lt;br /&gt;    &amp;lt;/ISWebScheduler:WebScheduler&amp;gt;&lt;br /&gt;        &lt;br /&gt;        &lt;br /&gt;        &lt;br /&gt;    &amp;lt;asp:SqlDataSource ID="SqlDataSource1" ConnectionString="user=root;password=mypass;database=mydb;server=localhost" runat="server"&amp;gt;&amp;lt;/asp:SqlDataSource&amp;gt;&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;I'm sure you can help or give me any suggestion.&lt;/p&gt;
&lt;p&gt;Thanks in advance. Regards,&lt;/p&gt;
&lt;p&gt;Mino&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>