﻿<?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 - Example without DataAdapter for InitializeSelfReferenceDataSource needed</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Example-wo-DataAdapter-for-InitializeSelfReferenceDataSource/</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>Example without DataAdapter for InitializeSelfReferenceDataSource needed</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Example-wo-DataAdapter-for-InitializeSelfReferenceDataSource/</link><pubDate>Wed, 09 Sep 2009 22:34:51 GMT</pubDate><dc:creator>yudi@intersoftpt.com</dc:creator><description>&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Glad to hear that you’ve found a solution of your problem and share it with us.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Thank you very much for your contribution in our community forum. Should you find any other questions, suggestions, or problems regarding our products, please feel free to post them in our forum.&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;&lt;/div&gt;</description></item><item><title>Example without DataAdapter for InitializeSelfReferenceDataSource needed</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Example-wo-DataAdapter-for-InitializeSelfReferenceDataSource/</link><pubDate>Wed, 09 Sep 2009 08:01:02 GMT</pubDate><dc:creator>Eric</dc:creator><description>&lt;p&gt;I solved this myself in the meantime. It is only partially related to WebGrid.&lt;/p&gt;
&lt;p&gt;Here's the example:&lt;/p&gt;&lt;pre&gt;Dim ds As DataSet = ... 'data to add

Dim dt As DataTable = CType(e.DataSource, DataTable)
dt.Merge(ds.Tables(0), True, MissingSchemaAction.Error)
&lt;/pre&gt;
</description></item><item><title>Example without DataAdapter for InitializeSelfReferenceDataSource needed</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Example-wo-DataAdapter-for-InitializeSelfReferenceDataSource/</link><pubDate>Tue, 08 Sep 2009 12:49:42 GMT</pubDate><dc:creator>Eric</dc:creator><description>&lt;p&gt;When loading data on demand in a grid that has several nodes and the user clicks on one of these minus boxes, then the node should open and the next level of data be displayed.&lt;/p&gt;
&lt;p&gt;For that is the InitializeSelfReferenceDataSource event. The parameter e.DataSource is read-only. Therefore the sample (in the documentation of this event) simply casts the e.DataSource into a DataTable. Then a DataAdapter fills in the data.&lt;/p&gt;
&lt;p&gt;How would this work when I only have an existing DataSet? I also tried to cast the e.DataSource to a DataTable and assigned the existing DataSet.Table(0) to that DataTable. But the grid doesn't get the data somehow.&lt;/p&gt;
&lt;p&gt;I also tried to copy the rows in a foreach loop, but I get a runtime error saying the rows belong to different tables.&lt;/p&gt;
&lt;p&gt;If I don't have a DataAdapter, only a DataSet, how would this event fetch the data for the grid?&lt;/p&gt;</description></item></channel></rss>