﻿<?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 - GetCell doesn't work with Hierarchical Grid</title><link>http://www.intersoftsolutions.com/Community/WebGrid/GetCell-doesnt-work-with-Hierarchical-Grid/</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>GetCell doesn't work with Hierarchical Grid</title><link>http://www.intersoftsolutions.com/Community/WebGrid/GetCell-doesnt-work-with-Hierarchical-Grid/</link><pubDate>Wed, 04 Nov 2009 08:09:54 GMT</pubDate><dc:creator>Michael</dc:creator><description>&lt;div id="result_box" dir="ltr"&gt;In the meantime, I've opened another thread: &lt;a href="http://www.intersoftpt.com/Community/WebGrid/GetChanges-problem-if-the-rows-are-grouped/" target="_blank"&gt;GetChanges() problem if the rows are grouped&lt;/a&gt;&lt;/div&gt;</description></item><item><title>GetCell doesn't work with Hierarchical Grid</title><link>http://www.intersoftsolutions.com/Community/WebGrid/GetCell-doesnt-work-with-Hierarchical-Grid/</link><pubDate>Mon, 02 Nov 2009 23:35:20 GMT</pubDate><dc:creator>Glayaar</dc:creator><description>&lt;p&gt;Sorry for the late reply, it seems in the WebGrid1_OnAcceptAllChanges client side event handler you are invoking this line:&lt;br /&gt;&lt;/p&gt;&lt;pre&gt;grd.XmlHttp.Asynchronous = false;grd.Refresh();
grd.XmlHttp.Asynchronous = true;&lt;/pre&gt;
&lt;p&gt;Those lines will collapse the other group which will cause the issue, our suggestion is to move those line after the iteration of deleted row changes.&lt;/p&gt;
&lt;p&gt;By moving those lines after the deleted row changes iteration the JS issue does not occur.&lt;/p&gt;
&lt;p /&gt;</description></item><item><title>GetCell doesn't work with Hierarchical Grid</title><link>http://www.intersoftsolutions.com/Community/WebGrid/GetCell-doesnt-work-with-Hierarchical-Grid/</link><pubDate>Mon, 19 Oct 2009 02:58:06 GMT</pubDate><dc:creator>Michael</dc:creator><description>&lt;p&gt;Hi Glenn&lt;/p&gt;
&lt;p&gt;Please have a look on my last post.&lt;/p&gt;
&lt;div id="result_box" dir="ltr"&gt;Can you reproduce this issue.&lt;/div&gt;
&lt;div dir="ltr"&gt; &lt;/div&gt;
&lt;div dir="ltr"&gt;Regards&lt;/div&gt;
&lt;div dir="ltr"&gt;Michael&lt;/div&gt;</description></item><item><title>GetCell doesn't work with Hierarchical Grid</title><link>http://www.intersoftsolutions.com/Community/WebGrid/GetCell-doesnt-work-with-Hierarchical-Grid/</link><pubDate>Mon, 12 Oct 2009 12:47:34 GMT</pubDate><dc:creator>Michael</dc:creator><description>&lt;p&gt;Hi Glenn&lt;/p&gt;
&lt;div id="result_box" dir="ltr"&gt;I still have a problem if the rows are groupiert. Please have a look on attached pictures and sample.&lt;/div&gt;
&lt;div dir="ltr"&gt;Following Code (&lt;em&gt;DelChanges[i].Row.GetCell()&lt;/em&gt;) works in first group only!&lt;/div&gt;
&lt;div dir="ltr"&gt;&lt;div id="result_box" dir="ltr"&gt;Have I forgotten anything?&lt;/div&gt;&lt;/div&gt;
&lt;div dir="ltr"&gt;&lt;pre&gt;var DelChanges = grd.GetChanges("Deleted");
for (var i in DelChanges) {
    if (DelChanges[i].Row.GetCell("Dependencies").Value &amp;gt; 0) {
        if (DependenciesText.length &amp;gt; 0)
            MessageQuantity = 2;
        else
            MessageQuantity = 1;
        DependenciesText &amp;#43;= "\n - " &amp;#43; DelChanges[i].Row.GetCell("CustomerID").Text &amp;#43; " | " &amp;#43; DelChanges[i].Row.GetCell("CompanyName").Text &amp;#43; " | " &amp;#43; DelChanges[i].Row.GetCell("ContactName").Text &amp;#43; " | " &amp;#43; DelChanges[i].Row.GetCell("ContactTitle").Text;
        DelChanges[i].Row.UndoChanges();
    }
}&lt;/pre&gt;&lt;/div&gt;
&lt;p dir="ltr"&gt;Please try my sample. &lt;/p&gt;
&lt;div dir="ltr"&gt;&lt;ol&gt;
&lt;li&gt;Change ConnectionString and run sample&lt;/li&gt;
&lt;li&gt;Delete a row in first group&lt;/li&gt;
&lt;li&gt;Accept all Changes (-&amp;gt; Messagebox)&lt;/li&gt;
&lt;li&gt;Delete a row in second group&lt;/li&gt;
&lt;li&gt;Accept all Changes (-&amp;gt; Error)&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;</description></item><item><title>GetCell doesn't work with Hierarchical Grid</title><link>http://www.intersoftsolutions.com/Community/WebGrid/GetCell-doesnt-work-with-Hierarchical-Grid/</link><pubDate>Mon, 12 Oct 2009 02:26:58 GMT</pubDate><dc:creator>Glayaar</dc:creator><description>&lt;p&gt;Invisible column will not be rendered, so it will not be accessible from client side function. However, we could use hidden data member property on a visble cell to hold the hidden column value. Here is a snippet to set the hidden column &lt;em&gt;description&lt;/em&gt; value in the &lt;em&gt;key&lt;/em&gt; column in the PrepareDateBindind server side event:&lt;/p&gt;&lt;pre&gt;WebGrid1.RootTable.Columns.GetNamedItem("description").Visible = false;&lt;br /&gt;WebGrid1.RootTable.Columns.GetNamedItem("key").HiddenDataMember = "description";&lt;/pre&gt;&lt;p&gt;During onAcceptAllChanges client side function you will need to access the cell element and retirve the &lt;em&gt;description&lt;/em&gt; attribute:&lt;/p&gt;&lt;pre&gt;var parentMod = grd.Tables["parent"].GetChanges("Modified");&lt;br /&gt;for (i = 0; i &amp;lt; parentMod.length; i&amp;#43;&amp;#43;)&lt;br /&gt;{   &lt;br /&gt;    parentMod[i].Row.GetCell("key").CellElement.getAttribute("description");&lt;br /&gt;}&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt; &lt;br /&gt;&lt;/p&gt;</description></item><item><title>GetCell doesn't work with Hierarchical Grid</title><link>http://www.intersoftsolutions.com/Community/WebGrid/GetCell-doesnt-work-with-Hierarchical-Grid/</link><pubDate>Sun, 11 Oct 2009 09:28:30 GMT</pubDate><dc:creator>Michael</dc:creator><description>&lt;p&gt;Hi Glenn&lt;/p&gt;
&lt;p&gt;Yes you are right but it doesn't work if &amp;lt;Column&amp;gt; is not visible.&lt;/p&gt;
&lt;p&gt;That's my problem.&lt;/p&gt;</description></item><item><title>GetCell doesn't work with Hierarchical Grid</title><link>http://www.intersoftsolutions.com/Community/WebGrid/GetCell-doesnt-work-with-Hierarchical-Grid/</link><pubDate>Fri, 09 Oct 2009 00:22:44 GMT</pubDate><dc:creator>Glayaar</dc:creator><description>&lt;p&gt;In hierarchical table, the code &lt;/p&gt;&lt;pre&gt;grd.Tables["&amp;lt;Table&amp;gt;"].GetChanges("Deleted")[i].Row.GetCell("&amp;lt;Column&amp;gt;").Value&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;will work. Attached is the sample code for the HierarchicalGrid, the sample will print out all the modified key value when Accept All Changes is invoked. &lt;br /&gt;&lt;/p&gt;</description></item><item><title>GetCell doesn't work with Hierarchical Grid</title><link>http://www.intersoftsolutions.com/Community/WebGrid/GetCell-doesnt-work-with-Hierarchical-Grid/</link><pubDate>Thu, 08 Oct 2009 08:18:06 GMT</pubDate><dc:creator>Michael</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;This code works fine in flat grid: &lt;/p&gt;&lt;pre&gt;grd.GetChanges("Deleted")[i].Row.GetCell("&amp;lt;Column&amp;gt;").Value
&lt;/pre&gt;

&lt;p&gt; &lt;/p&gt;
&lt;p&gt;But in Hierarchical Grid the following code doesn't work:&lt;/p&gt;&lt;em&gt;&lt;pre&gt;grd.Tables["&amp;lt;Table&amp;gt;"].GetChanges("Deleted")[i].Row.GetCell("&amp;lt;Column&amp;gt;").Value

grd.Tables.&amp;lt;Table&amp;gt;.GetChanges("Deleted")[i].Row.GetCell("&amp;lt;Column&amp;gt;").Value
&lt;/pre&gt;&lt;/em&gt;
&lt;p&gt;How can i get changes for each table in Hierarchical Grid?&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Michael&lt;/p&gt;</description></item></channel></rss>