﻿<?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 - How to access the child rows under a parent row in hierarchal grid group by scenarios</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-to-access-the-child-rows-under-a-parent-row-in-hierarchal-grid-group-by-scenarios/</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>How to access the child rows under a parent row in hierarchal grid group by scenarios</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-to-access-the-child-rows-under-a-parent-row-in-hierarchal-grid-group-by-scenarios/</link><pubDate>Wed, 07 Dec 2011 03:36:35 GMT</pubDate><dc:creator>handy@intersoftpt.com</dc:creator><category>access child row in hierarchal grid</category><description>&lt;p&gt;Hello Suhas,&lt;/p&gt;&lt;p&gt;Based on your description, I tried to load WebGrid based on saved xml. When I looked up into GetRowsCount, it shows the correct result for multiple times. Perhaps, there are something I missed. Can you provide me a simple runable sample that replicates this issue? Perhaps, your structure is required.&lt;br /&gt;But I still need it to be runable in order to debug and anlayze the issue.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Handy&lt;/p&gt;</description></item><item><title>How to access the child rows under a parent row in hierarchal grid group by scenarios</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-to-access-the-child-rows-under-a-parent-row-in-hierarchal-grid-group-by-scenarios/</link><pubDate>Tue, 06 Dec 2011 05:29:40 GMT</pubDate><dc:creator>suhastj</dc:creator><category>access child row in hierarchal grid</category><description>&lt;p&gt;Thanks for the replay.&lt;/p&gt;
&lt;p&gt;There is a bug in ISWebgrid that has been posted and also accepted by Intersoft. The bug is, when ever a check is enabled for each row, after checking a row if we perform any sort of operations like Group by field or box, the checks are not retained. This issue is present only in hierarchecal grid. So we can replicate this issue only in 2nd level rows onwards.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;In order to have a work around until Iswebgrid come up with a fix, i have stored the Web grid row information as an xml. When ever a post back happens, i have to do following operations&lt;/p&gt;
&lt;p&gt;1. Read the Xml and and based on the information check the rows from client side.&lt;/p&gt;
&lt;p&gt;2. If the row was expanded by user, it has to be expanded as well.&lt;/p&gt;
&lt;p&gt;3. If the group row is present, i need to maintain the group row as well.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;In order to resolve the hierarchecal grid scenario i have a method as shown.&lt;/p&gt;
&lt;pre&gt;function RecursiveCheckRow(xmlData,gridRootTable,isFirstCall) {
  var count = gridRootTable.GetRowsCount();
  for(i=0;i&amp;lt;count;i&amp;#43;&amp;#43;) {
     var canBeChecked=false;
     var row = null;
     if(isFirstCall)
        row = gridRootTable.GetRow(i);
     else
        row = gridRootTable.GetChildRow(rowIter);

     // Identify each row and if the row needs to be checked, 
     // Mark it as "can be checked".
     if(canBeChecked) {
        row.Check();
        // If row has child rows, call the same method resursively
        RecursiveCheckRow(xml,row,false);
     }
  }

}&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;In first call i will get the count but in second call onwards i will not get the count. I tried &lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;p&gt;rowCount = gridRootTable.GetChildRows().length; and it worked but i need to know what all API's i can use from client side to get the row count. Some times, gridRootTable.GetChildRows().length returns 1, even if the row has multiple child rows.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Please let me know, if explains what you are looking for?&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks,&lt;/p&gt;&lt;p&gt;Suhas &lt;/p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>How to access the child rows under a parent row in hierarchal grid group by scenarios</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-to-access-the-child-rows-under-a-parent-row-in-hierarchal-grid-group-by-scenarios/</link><pubDate>Tue, 06 Dec 2011 02:08:29 GMT</pubDate><dc:creator>handy@intersoftpt.com</dc:creator><category>access child row in hierarchal grid</category><description>&lt;p&gt;Hello Suhas,&lt;/p&gt;&lt;p&gt;There are several ways to use RowsCount method. However, I would like to know your code snippet first.&lt;br /&gt;e.g If I simply use WebGrid1.RootTable.GetRowsCount(), it would not show error. In your code, you used &lt;span style="color: rgb(63, 63, 63); font-family: 'segoe ui', arial, verdana, tahoma; font-size: 12px; line-height: 18px; background-color: rgb(255, 255, 255); "&gt;API&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: consolas; color: rgb(63, 63, 63); line-height: 18px; text-align: left; background-color: rgb(255, 255, 255); font-size: 11pt; "&gt;&lt;span style="font-size: 11pt; "&gt;row. What exactly this &lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(63, 63, 63); font-family: 'segoe ui', arial, verdana, tahoma; font-size: 12px; line-height: 18px; background-color: rgb(255, 255, 255); "&gt;API&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: consolas; color: rgb(63, 63, 63); line-height: 18px; text-align: left; background-color: rgb(255, 255, 255); font-size: 11pt; "&gt;&lt;span style="font-size: 11pt; "&gt;row?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: consolas; color: rgb(63, 63, 63); line-height: 18px; text-align: left; background-color: rgb(255, 255, 255); font-size: 11pt; "&gt;&lt;span style="font-size: 11pt; "&gt;Regards,&lt;br /&gt;Handy&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>How to access the child rows under a parent row in hierarchal grid group by scenarios</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-to-access-the-child-rows-under-a-parent-row-in-hierarchal-grid-group-by-scenarios/</link><pubDate>Fri, 02 Dec 2011 01:59:23 GMT</pubDate><dc:creator>suhastj</dc:creator><category>access child row in hierarchal grid</category><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Can any one please tell me how to perform follwoing actions. &lt;/p&gt;
&lt;p&gt;I have attached the screen shot of the Hierarchal grid structure in attachments. Based on that i have following doubts. I need Client side events/ methods for the following.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;1. When i group based on a column (In screen capture the column is process id), i want to get all the rows under a row.&lt;/p&gt;
&lt;p&gt;With respect to the screen capture (With group by enabled), i want to get all the row whos wo_id = "100" from client side.&lt;/p&gt;
&lt;p&gt;2. I want to get the count of child rows. Say how many rows are present under the row with wo_id = 100.&lt;/p&gt;
&lt;p&gt;3. I want to expand the top most group.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;NOTE:&lt;/p&gt;
&lt;p&gt;When i use the API &lt;span style="font-family: consolas; font-size: 11pt"&gt;&lt;span style="font-family: consolas; font-size: 11pt"&gt;row.GetRowsCount();, I will get an exception and it is only in group by scenario. In normal scenario, it works fine.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family: consolas; font-size: 11pt"&gt;&lt;span style="font-family: consolas; font-size: 10pt"&gt;
&lt;p&gt;"Unable to get value of the property 'tagName': object is null or undefined"&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Please share your ideas on how to achieve the above scenarios when i group the columns.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Thanks in advance,&lt;/p&gt;
&lt;p&gt;Suhas T J&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;
&lt;p&gt;&lt;span style="font-family: consolas; font-size: 11pt"&gt;&lt;span style="font-family: consolas; font-size: 11pt"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;</description></item></channel></rss>