﻿<?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 - ClientUI - How to get the Checked Child Rows count</title><link>http://www.intersoftsolutions.com/Community/ClientUI/How-to-get-the-Checked-Child-Rows-count/</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 get the Checked Child Rows count</title><link>http://www.intersoftsolutions.com/Community/ClientUI/How-to-get-the-Checked-Child-Rows-count/</link><pubDate>Mon, 17 Oct 2011 02:40:51 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="font-family: 'segoe ui', sans-serif; color: rgb(31, 73, 125); font-size: 9pt; "&gt;In order to get the number of checked rows at the root-table level in client-side, you can try to use following snippet code.&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;function button1_onclick() {    var WebGrid1 = ISGetObject("WebGrid1");    var checkedRowsLength = WebGrid1.RootTable.GetCheckedRows().length;    alert(checkedRowsLength);            
    return true;
}&lt;/pre&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui', sans-serif; color: rgb(31, 73, 125); font-size: 9pt; "&gt;Following snippet code shows how to get the number of checked rows at the child-table level in client-side.&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;function button1_onclick() {
    var WebGrid1 = ISGetObject("WebGrid1");
    var rootTable = WebGrid1.RootTable;
    var childTable = rootTable.ChildTables[0];
    var checkedRowsLength = childTable.GetCheckedRows().length;
    alert(checkedRowsLength);            
    return true;
}&lt;/pre&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui', sans-serif; color: rgb(31, 73, 125); font-size: 9pt; "&gt;For your specific scenario, get the number of checked rows at child-table level based on the selected parent row, can be implemented by iterating trough the child rows and examine the Checked status.&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;function button1_onclick() {
    var WebGrid1 = ISGetObject("WebGrid1");
    var parentSelectedRow = WebGrid1.GetSelectedObject().ToRowObject();
    var childRows = parentSelectedRow.GetChildRows();
    var checkedRowsLength = 0;
    for (var i = 0; i &amp;lt; childRows.length; i&amp;#43;&amp;#43;) {
        if (childRows[i].Checked)
            checkedRowsLength&amp;#43;&amp;#43;;
    }
    alert(checkedRowsLength);            
    return true;
}&lt;/pre&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui', sans-serif; color: rgb(31, 73, 125); font-size: 9pt; "&gt;Hope this helps.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui', sans-serif; color: rgb(31, 73, 125); font-size: 9pt; "&gt;*Edited&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui', sans-serif; color: rgb(31, 73, 125); font-size: 9pt; "&gt;Reason: asking member to post in the correct thread&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui', sans-serif; color: rgb(31, 73, 125); font-size: 9pt; "&gt;Hello Madhavan,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui', sans-serif; color: rgb(31, 73, 125); font-size: 9pt; "&gt;As you may have noticed, this thread discuss about WebGrid but located under ClientUI area. In the future, please kindly post in the correct topic area as your thread subject would describe.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>How to get the Checked Child Rows count</title><link>http://www.intersoftsolutions.com/Community/ClientUI/How-to-get-the-Checked-Child-Rows-count/</link><pubDate>Fri, 14 Oct 2011 12:37:24 GMT</pubDate><dc:creator>Skgrid@intersoftpt.com</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am able to get the Checked Rows count of the RootTable.&lt;/p&gt;
&lt;p&gt;If i have selected a child row,how can i get the Checked Rows count of the selected Row.&lt;/p&gt;
Bascically I need to get the Checked Child Rows Count of the selected parent row.</description></item></channel></rss>