﻿<?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 - Enabling/Disabling Rows</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Enabling-Disabling-Rows/</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>Enabling/Disabling Rows</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Enabling-Disabling-Rows/</link><pubDate>Tue, 06 Apr 2010 00:14:51 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;In WebGridRow class, there is a public property named “ForceNoEdit” that will suit with your scenario. “ForceNoEdit” determines whether this row will be forced to not allow editing. Enabling this property on row will force the corresponding row to be read-only. Below is the snippet code that shows how to enable a read-only row from server side event.&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;protected void productGrid_InitializeRow(object sender, ISNet.WebUI.WebGrid.RowEventArgs e)
{
    &lt;span style="color: #c00000"&gt;e.Row.ForceNoEdit = true;&lt;/span&gt;
}&lt;/pre&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;You can also disabling row editing on client side event by invoking “SetForceNoEdit(parameter)” method of WebGridRow. The parameter has a Boolean value, true means Not Editable, false means Editable. Below is the snippet code that shows how to enable a read-only row from client side event.&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;span style="color: #c00000"&gt;selectedRow.SetForceNoEdit(forceNoEdit);&lt;/span&gt; // set the row as editable (false) or not editable (true)&lt;/pre&gt;

&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;For more detail, please check ProductCatalog.aspx and Client_ProgrammaticEdit.aspx reference sample in WebGridSamples project. Hope this helps.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Enabling/Disabling Rows</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Enabling-Disabling-Rows/</link><pubDate>Mon, 05 Apr 2010 11:24:37 GMT</pubDate><dc:creator>JohnnyBravo</dc:creator><description>&lt;p&gt;I am attempting to bring rows from a database into a WebGrid. The table has an identity column. I'd like to make any row in the grid that has a value in the idenity column readonly. Any new row that is added on the front end should be editable. How can I do this?&lt;/p&gt;</description></item></channel></rss>