﻿<?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 - Object</title><link>http://www.intersoftsolutions.com/Community/Tags/Object/</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>Simple question on binding to complex object</title><link>http://www.intersoftsolutions.com/Community/Tags/Object/</link><pubDate>Tue, 16 Mar 2010 09:57:17 GMT</pubDate><dc:creator>samtran0331</dc:creator><category>Object</category><category>binding</category><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I'm trying to bind a complex object and can't figure out how to do it using WebGrid.&lt;/p&gt;
&lt;p&gt;With a normal ASP.Net GridView control, I can do this:&lt;/p&gt;
&lt;p&gt; &amp;lt;asp:TemplateField HeaderText="Sun ETID"&amp;gt;&lt;br /&gt; &amp;lt;ItemTemplate&amp;gt;&lt;br /&gt; &amp;lt;asp:Label ID="Label1" runat="server" Text='&amp;lt;%# Eval("&lt;strong&gt;Sunday.ETID&lt;/strong&gt;") %&amp;gt;'&amp;gt;&amp;lt;/asp:Label&amp;gt;&lt;br /&gt; &amp;lt;/ItemTemplate&amp;gt;&lt;br /&gt; &amp;lt;/asp:TemplateField&amp;gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;With a Telerik RadGrid, I can do this:&lt;/p&gt;
&lt;p&gt; &amp;lt;telerik:GridBoundColumn UniqueName="column3" DataField="&lt;strong&gt;Sunday.ETID&lt;/strong&gt;" HeaderText="Sun ETID"&amp;gt;&lt;br /&gt; &amp;lt;/telerik:GridBoundColumn&amp;gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;My datasource is an object called "Timesheet" this is the datasource for the grids.&lt;/p&gt;
&lt;p&gt;Within the Timesheet object is another collection of objects for each day of the week.  &lt;br /&gt;&lt;/p&gt;
&lt;p&gt;That is why I can bind to "Sunday.ETID"..."Sunday" is an object within "Timesheet"&lt;/p&gt;
&lt;p&gt;And "Sunday" has a property called "ETID".&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;What would be the syntax to bind a column using Intersoft WebGrid?&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Thanks!&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>