﻿<?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 - Hierarchical Grid with Row Checker Columns</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Hierarchical-Grid-with-Row-Checker-Columns/</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>Hierarchical Grid with Row Checker Columns</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Hierarchical-Grid-with-Row-Checker-Columns/</link><pubDate>Fri, 14 May 2010 08:12:39 GMT</pubDate><dc:creator>acunningham</dc:creator><description>&lt;p&gt;Glen,&lt;/p&gt;&lt;p&gt;I figured out what the issue was.  My original version had the markup defining the layout of the gird which never quite worked so I configured my grid in the Code-Behind in the PrepareDataBinding method.&lt;/p&gt;
&lt;p&gt;However, I never actually removed the markup which was somehow interfering with the layout generated by the code-behind, so I removed the markup and this has resolved my issue.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Adrian.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Hierarchical Grid with Row Checker Columns</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Hierarchical-Grid-with-Row-Checker-Columns/</link><pubDate>Thu, 13 May 2010 21:41:16 GMT</pubDate><dc:creator>Glayaar</dc:creator><description>&lt;p&gt;I have modified the test sample to simulate the new detail in your scenario. I still could not replicate the strange behavior you mention in my environment. Could you modify the attached sample to replicate the strange behavior?&lt;/p&gt;&lt;p&gt;The test is done using the latest WebGrid 7 and WebUI Framework 3 build, which is build 402 and build 752.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Hierarchical Grid with Row Checker Columns</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Hierarchical-Grid-with-Row-Checker-Columns/</link><pubDate>Wed, 12 May 2010 08:27:30 GMT</pubDate><dc:creator>acunningham</dc:creator><description>Glen,&lt;p&gt;The RowChecker columns are not bound to a database field, I manual created the Row Checker columns in the PrepareDataBinding method in the code behind and I still get this strange behaviour.&lt;/p&gt;
&lt;p&gt;Any ideas?&lt;/p&gt;
&lt;p&gt;Here is the code for creating the row check columns:&lt;/p&gt;&lt;pre&gt;WebGridColumnCollection rootColumns = grdEDMPortfolios.RootTable.Columns;&lt;br /&gt;rootColumns.Insert(0, new WebGridColumn("chkEDM", "", " ", new Unit("23px"), ColumnType.CheckBox, EditType.NoEdit, ""));&lt;br /&gt;rootColumns.GetNamedItem("chkEDM").IsRowChecker = true;&lt;br /&gt;rootColumns.GetNamedItem("chkEDM").Bound = false;&lt;br /&gt;&lt;br /&gt;WebGridTable childTable = grdEDMPortfolios.RootTable.ChildTables[0];&lt;br /&gt;WebGridColumnCollection childColumns = grdEDMPortfolios.RootTable.ChildTables[0].Columns;&lt;br /&gt;childColumns.Insert(0, new WebGridColumn("chkPortfolio", "", " ", new Unit("23px"), ColumnType.CheckBox, EditType.NoEdit, ""));&lt;br /&gt;childColumns.GetNamedItem("chkPortfolio").IsRowChecker = true;&lt;br /&gt;childColumns.GetNamedItem("chkPortfolio").Bound = false;&lt;br /&gt;&lt;/pre&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Adrian.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Hierarchical Grid with Row Checker Columns</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Hierarchical-Grid-with-Row-Checker-Columns/</link><pubDate>Wed, 12 May 2010 03:24:21 GMT</pubDate><dc:creator>Glayaar</dc:creator><description>&lt;p&gt;In my test, since you are using bounded data for the checkbox column you will not need to set the IsRowChecker property.&lt;/p&gt;&lt;p&gt;Regarding your issue, since the checkbox is bounded to the database field, you will need to make sure that the corresponding field in the database has already reflect the checkbox value in the WebGrid. The refresh button in the WebGrid will rebound the data from the database to the WebGrid again, so the rendered value reflect the databse value.    &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Hierarchical Grid with Row Checker Columns</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Hierarchical-Grid-with-Row-Checker-Columns/</link><pubDate>Tue, 11 May 2010 08:17:49 GMT</pubDate><dc:creator>acunningham</dc:creator><description>&lt;p&gt;Glen,&lt;/p&gt;&lt;p&gt;I have already been using the settings that you provided and it still doesn't work. There is some slighly strange behaviour, let me explain some more.&lt;/p&gt;
&lt;p&gt;I configure my hierarchical grid in the PrepareDataBinding method in the code behind:&lt;/p&gt;&lt;pre&gt;WebGridColumnCollection rootColumns = grdEDMPortfolios.RootTable.Columns;&lt;br /&gt;rootColumns.Insert(0, new WebGridColumn("chkEDM", AWBConstants.COL_REGISTRATION_ID, " ", new Unit("23px"), ColumnType.CheckBox, EditType.Checkbox, ""));&lt;br /&gt;rootColumns.GetNamedItem("chkEDM").IsRowChecker = true;&lt;br /&gt;&lt;br /&gt;WebGridTable childTable = grdEDMPortfolios.RootTable.ChildTables[0];&lt;br /&gt;WebGridColumnCollection childColumns = grdEDMPortfolios.RootTable.ChildTables[0].Columns;&lt;br /&gt;childColumns.Insert(0, new WebGridColumn("chkPortfolio", AWBConstants.COL_PORTFOLIO_ID, " ", new Unit("23px"), ColumnType.CheckBox, EditType.Checkbox, ""));&lt;br /&gt;childColumns.GetNamedItem("chkPortfolio").IsRowChecker = true;&lt;br /&gt;&lt;/pre&gt;
&lt;p&gt;Here I hide various columns I don't need as well as added my parent row checker column "chkEDM" and my child row checker column "chkPortfolio". The grid layout settings you stated above are set in the markup.&lt;/p&gt;
&lt;p&gt;I have also added a client side OnCheckBoxClick function to trigger a parent checkbox to check all children and vice versa. Here is is the code:&lt;/p&gt;&lt;pre&gt;    function grdEDMPortfolios_CheckBoxClick(gridId, tblName, colName, checkboxValue)&lt;br /&gt;    {&lt;br /&gt;        var grid = ISGetObject(gridId);&lt;br /&gt;        var selectedRow = grid.GetSelectedObject().GetRowObject();&lt;br /&gt;&lt;br /&gt;        if (colName == "chkEDM")&lt;br /&gt;        {&lt;br /&gt;&lt;br /&gt;            if (selectedRow.Table.ChildTables.length &amp;gt; 0)&lt;br /&gt;            {&lt;br /&gt;&lt;br /&gt;                var childRows = selectedRow.GetChildRows("PortfolioCollection");&lt;br /&gt;                for (var i = 0; i &amp;lt; childRows.length; i&amp;#43;&amp;#43;)&lt;br /&gt;                {&lt;br /&gt;                    if(!childRows[i].GetCells().GetNamedItem("chkPortfolio").ForceNoEdit)&lt;br /&gt;                    {&lt;br /&gt;                        if (checkboxValue)&lt;br /&gt;                        {&lt;br /&gt;                            childRows[i].Check();&lt;br /&gt;                        }&lt;br /&gt;                        else&lt;br /&gt;                        {&lt;br /&gt;                            childRows[i].Uncheck();&lt;br /&gt;                        }&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        EnableCopyToShell();&lt;br /&gt;        return true;&lt;br /&gt;    }&lt;/pre&gt;
&lt;p&gt;The behaviour I witness is as follows:&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;Click on one of the child check boxes.&lt;/li&gt;&lt;li&gt;Click the grid's refresh icon&lt;/li&gt;&lt;li&gt;The child checkbox is persisted after the grid refreshes.&lt;/li&gt;&lt;li&gt;Click on the child checkbox again then click refresh.&lt;/li&gt;&lt;li&gt;After refresh all child checkboxes are selected even though only one was selected.&lt;/li&gt;&lt;/ol&gt;Regards,&lt;br /&gt;Adrian.&lt;br /&gt;</description></item><item><title>Hierarchical Grid with Row Checker Columns</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Hierarchical-Grid-with-Row-Checker-Columns/</link><pubDate>Mon, 10 May 2010 22:29:06 GMT</pubDate><dc:creator>Glayaar</dc:creator><description>&lt;p&gt;In my test, using the property &lt;em&gt;PersistRowChecker="true"&lt;/em&gt; and &lt;em&gt;RestoreExpandedChildRows="true"&lt;/em&gt; under LayoutSettings in the WebGrid will achieve the result you wanted.&lt;/p&gt;&lt;p&gt;Attached is the simple test sample I used to simulate the scenario in my environment.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Hierarchical Grid with Row Checker Columns</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Hierarchical-Grid-with-Row-Checker-Columns/</link><pubDate>Mon, 10 May 2010 18:13:16 GMT</pubDate><dc:creator>acunningham</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have a hierarchial grid with parent and child tables.  The Grid layout is such that the hierarchical structure looks and acts like a tree.  &lt;br /&gt;&lt;/p&gt;
&lt;p&gt;The root table has a row check column called "chkParent" and the child table has a row checker column called "chkChild".  The key data in the grid that I want to work with is the child data.  For example I have a DropButton with a list of actions, these actions will be performed against any "Checked" child rows.&lt;/p&gt;
&lt;p&gt;The purpose for the parent row checker is so that I can write a JavaScript function to check/uncheck all the children.&lt;/p&gt;
&lt;p&gt;The problem I'm having is that the correct will correctly Persist the checked rows for the parent table but not the child table.  &lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Is there any way to have both Parent and Child checked rows persisted correctly.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Adrian.&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>