﻿<?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 do I set the color of an expanded row in a Webgrid</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-do-I-set-the-color-of-an-expanded-row-in-a-Webgrid/</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 do I set the color of an expanded row in a Webgrid</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-do-I-set-the-color-of-an-expanded-row-in-a-Webgrid/</link><pubDate>Sun, 20 Nov 2011 20:16:11 GMT</pubDate><dc:creator>yudi</dc:creator><category>WebGrid Color Expanded Row</category><description>&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;The scenario can be implemented by utilizing the OnChildRowExpand and OnChildRowCollapse client-side (JavaScript) event. On each event, set the background color of the row and cells to a color as shown in the following snippet code.&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;function WebGrid1_OnChildRowExpand(controlId, tblName, rowIndex, rowEl) {
    var WebGrid1 = ISGetObject(controlId);

    // use the code below to set the background color of row element
    rowEl.style.backgroundColor = "Yellow";

    // iterates through each cell element and set its background color
    for (var i = 0; i &amp;lt; rowEl.cells.length; i&amp;#43;&amp;#43;) {
        rowEl.cells[i].style.backgroundColor = "Yellow";
    }

    return true;
}

function WebGrid1_OnChildRowCollapse(controlId, tblName, rowIndex, rowEl) {
    var WebGrid1 = ISGetObject(controlId);

    // use the code below to reset the background color of row element
    rowEl.style.backgroundColor = "";

    // iterates through each cell element and reset its background color
    for (var i = 0; i &amp;lt; rowEl.cells.length; i&amp;#43;&amp;#43;) {
        rowEl.cells[i].style.backgroundColor = "";
    }

    return true;
}&lt;/pre&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;A simple sample of is enclosed as attachment for reference.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Please kindly let us know whether this helps or not.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>How do I set the color of an expanded row in a Webgrid</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-do-I-set-the-color-of-an-expanded-row-in-a-Webgrid/</link><pubDate>Fri, 18 Nov 2011 13:21:22 GMT</pubDate><dc:creator>neil.turner@ntd.co.uk</dc:creator><category>WebGrid Color Expanded Row</category><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I have a hierachical grid&lt;/p&gt;
&lt;p&gt;I want the background color of an expanded row to change and be retained until the row is collapsed.&lt;/p&gt;
&lt;p&gt;What is the best way to achieve that please?&lt;/p&gt;</description></item></channel></rss>