<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Pulling my hair out with ObjectDataSources...</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Pulling my hair out with ObjectDataSources...</description>
  <pubDate>Wed, 13 May 2026 05:47:19 -700</pubDate>
  <lastBuildDate>Wed, 16 May 2012 09:13:21 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=3438</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Pulling my hair out with ObjectDataSources... :   Hi Silvio,Thanks for the quick...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3438&amp;PID=13584#13584</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1380" rel="nofollow">markfinch</a><br /><strong>Subject:</strong> 3438<br /><strong>Posted:</strong> 16-May-2012 at 9:13am<br /><br />Hi Silvio,<div>&nbsp;</div><div>Thanks for the quick response. I had implemented your first suggestion "ondatacontextchanged" which solved some of my problems and then got stuck again with viewing large lists of data e.g. a Customer has 30000 assets for instance.</div><div>&nbsp;</div><div>I still had no luck with the boolean filter but I will definately look into the EntityQueryPager as I think this will solve my issue. Especially as I need to page across both the server side and cached entities at the same time which I know the objectdatasource doesnt handle.</div><div>&nbsp;</div><div>I will let you know how I get on...</div><div>&nbsp;</div><div>Thanks for all your help</div><div>&nbsp;</div><div>Mark</div>]]>
   </description>
   <pubDate>Wed, 16 May 2012 09:13:21 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3438&amp;PID=13584#13584</guid>
  </item> 
  <item>
   <title>Pulling my hair out with ObjectDataSources... :   Hi Mark,Regarding your concerns:1...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3438&amp;PID=13578#13578</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=892" rel="nofollow">sbelini</a><br /><strong>Subject:</strong> 3438<br /><strong>Posted:</strong> 15-May-2012 at 12:14pm<br /><br />Hi Mark,<div>&nbsp;</div><div>Regarding your concerns:</div><div>&nbsp;</div><div>1 - You could set the query in code instead:</div><div>&nbsp;</div><div><font size="2" face="C&#111;nsolas"><font size="2" face="C&#111;nsolas">_myDataSource.Query = mgr.Products.Where(prod =&gt; prod.ProductID == ProdID);</font></font></div><div>&nbsp;</div><div>&nbsp;</div><div>2 - Unfortunatelly this is not yet possible. I will add a feature request for it.</div><div>&nbsp;</div><div>3 - I was able to filter on a boolean property without any problems: (tested with NorthwindIB.Products.Discontinued property)</div><div>&nbsp;</div><div><font color="#0000ff" size="2" face="C&#111;nsolas"><font color="#0000ff" size="2" face="C&#111;nsolas"><font color="#0000ff" size="2" face="C&#111;nsolas">&lt;</font></font></font><font color="#a31515" size="2" face="C&#111;nsolas"><font color="#a31515" size="2" face="C&#111;nsolas"><font color="#a31515" size="2" face="C&#111;nsolas">ib</font></font></font><font color="#0000ff" size="2" face="C&#111;nsolas"><font color="#0000ff" size="2" face="C&#111;nsolas"><font color="#0000ff" size="2" face="C&#111;nsolas">:</font></font></font><font color="#a31515" size="2" face="C&#111;nsolas"><font color="#a31515" size="2" face="C&#111;nsolas"><font color="#a31515" size="2" face="C&#111;nsolas">FilterDescriptor</font></font></font><font color="#ff0000" size="2" face="C&#111;nsolas"><font color="#ff0000" size="2" face="C&#111;nsolas"><font color="#ff0000" size="2" face="C&#111;nsolas"> PropertyPath</font></font></font><font color="#0000ff" size="2" face="C&#111;nsolas"><font color="#0000ff" size="2" face="C&#111;nsolas"><font color="#0000ff" size="2" face="C&#111;nsolas">="Discontinued"</font></font></font><font color="#ff0000" size="2" face="C&#111;nsolas"><font color="#ff0000" size="2" face="C&#111;nsolas"><font color="#ff0000" size="2" face="C&#111;nsolas"> Operator</font></font></font><font color="#0000ff" size="2" face="C&#111;nsolas"><font color="#0000ff" size="2" face="C&#111;nsolas"><font color="#0000ff" size="2" face="C&#111;nsolas">="IsEqualTo"</font></font></font><font color="#ff0000" size="2" face="C&#111;nsolas"><font color="#ff0000" size="2" face="C&#111;nsolas"><font color="#ff0000" size="2" face="C&#111;nsolas"> Value</font></font></font><font color="#0000ff" size="2" face="C&#111;nsolas"><font color="#0000ff" size="2" face="C&#111;nsolas"><font color="#0000ff" size="2" face="C&#111;nsolas">="true" /&gt;</font></font></font></div><div>&nbsp;</div><div>Have you considered using a <span ="wiki"><a href="http://drc.ideablade.com/xwiki/bin/view/&#068;ocumentati&#111;n/query-paging#HEntityQueryPager" target="_blank"><u><font color="#0066cc">EntityQueryPager</font></u></a>&nbsp;or <span ="wiki"><a href="http://drc.ideablade.com/xwiki/bin/view/&#068;ocumentati&#111;n/query-paging#HEntityQueryPagedCollecti&#111;nView" target="_blank"><u><font color="#0066cc">EntityQueryPagedCollectionView</font></u></a>&nbsp;instead? They are more robust and provide more functionality. You can find <a href="http://drc.ideablade.com/xwiki/bin/view/&#068;ocumentati&#111;n/code-sample-entityquerypager" target="_blank">EntityQueryPager Samples</a> and <a href="http://drc.ideablade.com/xwiki/bin/view/&#068;ocumentati&#111;n/code-sample-paged-collecti&#111;n" target="_blank">EntityQueryPagedCollectionView Samples</a> in the DRC.</span></span></div><div><span ="wiki"><span ="wiki">There you will also find several <a href="http://drc.ideablade.com/xwiki/bin/view/Main/Search?text=&#111;bjectdatasource&amp;x=0&amp;y=0" target="_blank">ObjectDataSources samples</a>.</span></span></div><div><span ="wiki"><span ="wiki"></span></span>&nbsp;</div><div><span ="wiki"><span ="wiki">Regards,</span></span></div><div><span ="wiki"><span ="wiki">&nbsp;&nbsp; Silvio.</span></span></div>]]>
   </description>
   <pubDate>Tue, 15 May 2012 12:14:25 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3438&amp;PID=13578#13578</guid>
  </item> 
  <item>
   <title>Pulling my hair out with ObjectDataSources... :    Hi everyone,I really hope...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3438&amp;PID=13577#13577</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1380" rel="nofollow">markfinch</a><br /><strong>Subject:</strong> 3438<br /><strong>Posted:</strong> 13-May-2012 at 9:22am<br /><br />Hi everyone,<div>&nbsp;</div><div>I really hope someone can help with this issue I am having. It seems to me that the objectdatasource is very limited.</div><div>&nbsp;</div><div>I am trying what I think to be very simple, I have a customer details page, in the page is a datagrid of related contacts Customer.Customers_Contacts and I wanted to use the objectdatasource to view only the 'active' contacts for that customer.</div><div>&nbsp;</div><div>Firstly I cannot assign my own query that is independant of the entitymanager ie Customer_Contacts.where(x =&gt; x.Inactive = false &amp;&amp; x.CustomerID = customerid) I wanted to extend the customer entity and add a "FilteredContacts" query and bind this to the query parameter</div><div>&nbsp;</div><div>&nbsp;</div><div>Secondly failing step one I decided to try and use filterdescriptors on the objectdatasource to specify;</div><div><font color="#0000ff" size="2" face="C&#111;nsolas"><font color="#0000ff" size="2" face="C&#111;nsolas"><font color="#0000ff" size="2" face="C&#111;nsolas"></font></font></font>&nbsp;</div><div><p><font color="#a31515" size="2" face="C&#111;nsolas"><font color="#a31515" size="2" face="C&#111;nsolas"><font color="#a31515" size="2" face="C&#111;nsolas">ib</font></font></font><font color="#0000ff" size="2" face="C&#111;nsolas"><font color="#0000ff" size="2" face="C&#111;nsolas"><font color="#0000ff" size="2" face="C&#111;nsolas">:</font></font></font><font color="#a31515" size="2" face="C&#111;nsolas"><font color="#a31515" size="2" face="C&#111;nsolas"><font color="#a31515" size="2" face="C&#111;nsolas">FilterDescriptor</font></font></font><font color="#ff0000" size="2" face="C&#111;nsolas"><font color="#ff0000" size="2" face="C&#111;nsolas"><font color="#ff0000" size="2" face="C&#111;nsolas"> PropertyPath</font></font></font><font color="#0000ff" size="2" face="C&#111;nsolas"><font color="#0000ff" size="2" face="C&#111;nsolas"><font color="#0000ff" size="2" face="C&#111;nsolas">="CustomerID"</font></font></font><font color="#ff0000" size="2" face="C&#111;nsolas"><font color="#ff0000" size="2" face="C&#111;nsolas"><font color="#ff0000" size="2" face="C&#111;nsolas"> Operator</font></font></font><font color="#0000ff" size="2" face="C&#111;nsolas"><font color="#0000ff" size="2" face="C&#111;nsolas"><font color="#0000ff" size="2" face="C&#111;nsolas">="IsEqualTo" Value="{Binding CustomerID}"&nbsp;&gt;</font></font></font></p><font color="#0000ff" size="2" face="C&#111;nsolas"><font color="#0000ff" size="2" face="C&#111;nsolas"><font color="#0000ff" size="2" face="C&#111;nsolas"><div></div><font color="#000000">This would then substitute my current customers id into the filter (CANNOT HAVE A BINDING FOR VALUE)</font><div>&nbsp;</div><div><font color="#000000">Thirdly it seems that you cannot filter on a non-string property, (forgetting customerid) every time I try to&nbsp;filter on InActive (bool);</font></div><div>&nbsp;</div><div><p><font color="#a31515" size="2" face="C&#111;nsolas"><font color="#a31515" size="2" face="C&#111;nsolas"><font color="#a31515" size="2" face="C&#111;nsolas">ib</font></font></font><font color="#0000ff" size="2" face="C&#111;nsolas"><font color="#0000ff" size="2" face="C&#111;nsolas"><font color="#0000ff" size="2" face="C&#111;nsolas">:</font></font></font><font color="#a31515" size="2" face="C&#111;nsolas"><font color="#a31515" size="2" face="C&#111;nsolas"><font color="#a31515" size="2" face="C&#111;nsolas">FilterDescriptor</font></font></font><font color="#ff0000" size="2" face="C&#111;nsolas"><font color="#ff0000" size="2" face="C&#111;nsolas"><font color="#ff0000" size="2" face="C&#111;nsolas"> PropertyPath</font></font></font><font color="#0000ff" size="2" face="C&#111;nsolas"><font color="#0000ff" size="2" face="C&#111;nsolas"><font color="#0000ff" size="2" face="C&#111;nsolas">="InActive"</font></font></font><font color="#ff0000" size="2" face="C&#111;nsolas"><font color="#ff0000" size="2" face="C&#111;nsolas"><font color="#ff0000" size="2" face="C&#111;nsolas"> Operator</font></font></font><font color="#0000ff" size="2" face="C&#111;nsolas"><font color="#0000ff" size="2" face="C&#111;nsolas"><font color="#0000ff" size="2" face="C&#111;nsolas">="IsEqualTo" Value="false" &gt;</font></font></font></p><font color="#0000ff" size="2" face="C&#111;nsolas"><font color="#0000ff" size="2" face="C&#111;nsolas"><font color="#0000ff" size="2" face="C&#111;nsolas"><div></div><font color="#000000">The resultant query to the entity manager has disregarded by filter and simply queries all contacts???<div></div><div></div>I really hope there is a solution to this, can anyone shed some light before I pull out all of my hair :)<div></div><div></div>Thanks<div></div><div></div>Mark</font></font></font></font></div></font></font></font></div><span style="font-size:10px"><br /><br />Edited by markfinch - 13-May-2012 at 9:24am</span>]]>
   </description>
   <pubDate>Sun, 13 May 2012 09:22:09 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3438&amp;PID=13577#13577</guid>
  </item> 
 </channel>
</rss>