﻿<?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 differentiate editable vs non-editable cells</title><link>http://www.intersoftsolutions.com/Community/WebGrid/how-to-differentiate-editable-vs-non-editable-cells/</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 differentiate editable vs non-editable cells</title><link>http://www.intersoftsolutions.com/Community/WebGrid/how-to-differentiate-editable-vs-non-editable-cells/</link><pubDate>Fri, 03 Jun 2011 04:12:52 GMT</pubDate><dc:creator>Riendy</dc:creator><description>&lt;p&gt;Hi Rudy,&lt;/p&gt;&lt;p&gt;To mark non editable type with a different color in specific cell, you have to set the cell to non editable in code behind by setting ForceNoEdit to true in the cell. Please take a look at the snippet code bellow : &lt;/p&gt;&lt;pre&gt;protected void WebGrid1_InitializeRow(object sender, ISNet.WebUI.WebGrid.RowEventArgs e)
    {
        e.Row.Cells.GetNamedItem("CategoryID").ForceNoEdit = true; 
        // you can validate which cells that you want to set in true or false.
        if (e.Row.Cells.GetNamedItem("CategoryID").ForceNoEdit == true)
        {
            e.Row.Cells.GetNamedItem("CategoryID").Style.BackColor = System.Drawing.Color.SkyBlue;
        }
        
    }&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;For your information, you should not set edit type in WebGrid.NET designer if you want to get a cell, because EditType in WebGrid.NET designer is define a column not a cell.&lt;/p&gt;
&lt;p /&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Hope this helps.&lt;br /&gt;Riendy&lt;/p&gt;
&lt;p /&gt;</description></item><item><title>how to differentiate editable vs non-editable cells</title><link>http://www.intersoftsolutions.com/Community/WebGrid/how-to-differentiate-editable-vs-non-editable-cells/</link><pubDate>Wed, 01 Jun 2011 23:39:29 GMT</pubDate><dc:creator>kurry</dc:creator><description>&lt;p&gt;Is there a way to mark with different colour or whatever other means those cells that are editable. ie EditType property set to other than "NoEdit"?&lt;/p&gt;
&lt;p&gt;When users click anywhere on editable row, the cells colour turns white this leads the users to think that that cell can be edited. Frustration then soon sets in before they figure out it is not editable, but the next cell on that row is.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item></channel></rss>