﻿<?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 - ChildRowEmptyAction </title><link>http://www.intersoftsolutions.com/Community/WebGrid/ChildRowEmptyAction/</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>ChildRowEmptyAction </title><link>http://www.intersoftsolutions.com/Community/WebGrid/ChildRowEmptyAction/</link><pubDate>Tue, 18 Aug 2009 05:57:39 GMT</pubDate><dc:creator>jimmyps</dc:creator><category>WebGrid</category><category>Loading Child on Demand</category><category>ChildRowEmptyAction</category><description>&lt;blockquote&gt;&lt;p&gt;Hi Siva,&lt;/p&gt;&lt;p&gt;Yes, you can set &lt;b&gt;ChildNotExpandable&lt;/b&gt; property to true. This property is available in &lt;i&gt;WebGridRow&lt;/i&gt; class.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You can set the property in&amp;nbsp;&lt;i&gt;WebGrid1_InitializeRow&lt;/i&gt; event, which is shown in the following example.&amp;nbsp;&lt;/p&gt;&lt;pre&gt;protected void WebGrid1_InitializeRow(object sender, ISNet.WebUI.WebGrid.RowEventArgs e)
    {
        if (e.Row.GetChildTableRows(e.Row.Table.ChildTables[0]).Count == 0)
            e.Row.&lt;b&gt;ChildNotExpandable&lt;/b&gt; = true;
    }&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Adding to Gordon's reply, the reason why we don't automate this process is for performance reason. The checking for each child table row could be expensive and developers often used different way to measure the child rows availability.&lt;/p&gt;
&lt;p&gt;The above example will work if you're not using "hierarchical load on demand" feature, and it also assumes you're using strongly dataset which prefill the child rows, which may not be the case in some enterprise scenarios.&lt;/p&gt;
&lt;p&gt;Thus, a better solution is to let customers decide their own way to measure the child rows availability, and set the property when necessary.&lt;/p&gt;
&lt;p&gt;For instance, if you're using custom business object or LINQ query, you may use your own function such as:&lt;/p&gt;
&lt;p&gt;&lt;pre&gt;if (!MyDAL.HasOrder(e.Row.KeyValue))
{
      e.Row.ChildNotExpandable = true;
}&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Jimmy.&lt;/p&gt;</description></item><item><title>ChildRowEmptyAction </title><link>http://www.intersoftsolutions.com/Community/WebGrid/ChildRowEmptyAction/</link><pubDate>Tue, 18 Aug 2009 04:04:50 GMT</pubDate><dc:creator>gordont</dc:creator><category>WebGrid</category><category>Loading Child on Demand</category><category>ChildRowEmptyAction</category><description>&lt;p&gt;Hi Siva,&lt;/p&gt;&lt;p&gt;Yes, you can set &lt;b&gt;ChildNotExpandable&lt;/b&gt; property to true. This property is available in &lt;i&gt;WebGridRow&lt;/i&gt; class.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You can set the property in &lt;i&gt;WebGrid1_InitializeRow&lt;/i&gt; event, which is shown in the following example. &lt;/p&gt;&lt;pre&gt;protected void WebGrid1_InitializeRow(object sender, ISNet.WebUI.WebGrid.RowEventArgs e)
    {
        if (e.Row.GetChildTableRows(e.Row.Table.ChildTables[0]).Count == 0)
            e.Row.&lt;b&gt;ChildNotExpandable&lt;/b&gt; = true;
    }&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Hope this helps.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Gordon Tumewu&lt;/p&gt;</description></item><item><title>ChildRowEmptyAction </title><link>http://www.intersoftsolutions.com/Community/WebGrid/ChildRowEmptyAction/</link><pubDate>Tue, 18 Aug 2009 01:39:54 GMT</pubDate><dc:creator>sivambe</dc:creator><category>WebGrid</category><category>Loading Child on Demand</category><category>ChildRowEmptyAction</category><description>&lt;font class="Apple-style-span" face="'Lucida Sans Unicode'" size="3"&gt;&lt;span style="font-size: 13px; "&gt;I have made &amp;nbsp;set the ChildRowEmptyAction property value "HideChildContent", it loads the grid with all the rows '+' sign. If a row does not have a child row also it loads with '+' sign, Only on clicking that row the '+' sign disappears. can anyone tell how to make the '+' sign disappear during load of that row itself?&lt;/span&gt;&lt;/font&gt;</description></item></channel></rss>