﻿<?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 - Changing ForceNoEdit doesn't work until focus is lost.</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Changing-ForceNoEdit-doesnt-work-until-focus-is-lost/</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>Changing ForceNoEdit doesn't work until focus is lost.</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Changing-ForceNoEdit-doesnt-work-until-focus-is-lost/</link><pubDate>Thu, 01 Oct 2015 03:01:20 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Glad to know that the script helps.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #1f497d;"&gt;I will propose this to the WebGrid development team. Should you need further assistance or run into any problems regarding our controls, feel free to post it into our community. We would be happy to assist you again.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Changing ForceNoEdit doesn't work until focus is lost.</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Changing-ForceNoEdit-doesnt-work-until-focus-is-lost/</link><pubDate>Wed, 30 Sep 2015 15:11:36 GMT</pubDate><dc:creator>JamesM</dc:creator><description>&lt;p&gt;This works correctly, thank you. I believe the code should do this automatically however, and should not require using both the method and manually setting the values.&lt;/p&gt;</description></item><item><title>Changing ForceNoEdit doesn't work until focus is lost.</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Changing-ForceNoEdit-doesnt-work-until-focus-is-lost/</link><pubDate>Fri, 25 Sep 2015 07:32:56 GMT</pubDate><dc:creator>yudi@intersoftpt.com</dc:creator><description>&lt;p&gt;&lt;span style="color: #1f497d;"&gt;I modified ToggleNewRowEdit() JavaScript function on the Client_ProgrammaticEdit.aspx by adding few lines that will set the "City" cell to be editable without having to lose focus. After modified, The JS function looks like following:&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;function ToggleNewRowEdit(){
    // retrieves WebGrid's object
    var grid = ISGetObject("WebGrid1");
            
    // get new row element
    var newRowElement = grid.RootTable.GetNewRow();

    // convert the newRowElement (HTMLElement) to WebGridRow object
    var newRow = grid.RootTable.ToRowObject(newRowElement);
    newRow.Select(); // select the new row
			
    if (editable)
    {			    
        editable = false;			    
        alert("NewRow cell[City] is editable");
    }
    else
    {
        editable = true;
        alert("NewRow cell[City] is not editable");
    }
			    
    // set the cell as editable (false) or not editable (true)
    newRow.GetCell("City").SetForceNoEdit(editable);

    // Manually set "City" to be editable
    if (!editable)
    {
        newRow.GetCell("City").ForceNoEdit = false;
        newRow.GetCell("City").CellElement.noEdit = "False";
    }
			
    return true;
}&lt;/pre&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;I followed the same steps and found that "City" is editable after button-click for the second time.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Hope this helps.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Changing ForceNoEdit doesn't work until focus is lost.</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Changing-ForceNoEdit-doesnt-work-until-focus-is-lost/</link><pubDate>Wed, 23 Sep 2015 14:54:50 GMT</pubDate><dc:creator>JamesM</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;&lt;p&gt;I have tested the sample you provided and my issue still exists. As I mentioned, I use the ForceNoEdit method and the problem only exists when the state is being changed from uneditable to editable.&lt;/p&gt;&lt;p&gt;To reproduce the issue:&lt;/p&gt;&lt;p&gt;&lt;ol&gt;&lt;li&gt;Click the "Set city as not-editable for New Row only" button&lt;/li&gt;&lt;li&gt;Click the button again&lt;/li&gt;&lt;li&gt;Select the new row and attempt to edit the city field.&lt;/li&gt;&lt;/ol&gt;The message from the second button click will have told you that the state is set to editable, but the field is still not editable. This can be achieved by selecting another row and returning, but this should not be necessary.&lt;/p&gt;</description></item><item><title>Changing ForceNoEdit doesn't work until focus is lost.</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Changing-ForceNoEdit-doesnt-work-until-focus-is-lost/</link><pubDate>Mon, 21 Sep 2015 04:00:24 GMT</pubDate><dc:creator>yudi@intersoftpt.com</dc:creator><description>&lt;p&gt;&lt;span style="color: #1f497d;"&gt;I tried to reproduce the problem in Client_ProgrammaticEdit.aspx sample file of WebGrid but my efforts were not successful. The &lt;a href="http://live.intersoftsolutions.com/cs/WebGrid/Client_ProgrammaticEdit.aspx?noframe=1" target="_blank"&gt;sample&lt;/a&gt; provides two ways to toggle a column/cell to be editable or not (set EditType to "NoEdit" or invoke SetForceNoEdit(true) method).&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Following is the detail of step-by-step when testing the reported problem.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Toggle edit/no edit by setting EditType property.&lt;/span&gt;&lt;/p&gt;
&lt;ol style="color: #1f497d;"&gt;&lt;li&gt;Select a row.&lt;/li&gt;&lt;li&gt;Edit a cell.&lt;/li&gt;&lt;li&gt;Click "Toggle Column Edit/NoEdit" button.&lt;/li&gt;&lt;li&gt;Try to edit CustomerID column. It is now not-editable.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Toggle edit/no edit by invoking SetForceNoEdit() method.&lt;/span&gt;&lt;/p&gt;
&lt;ol style="color: #1f497d;"&gt;&lt;li&gt;Select the new row.&lt;/li&gt;&lt;li&gt;Edit a cell.&lt;/li&gt;&lt;li&gt;Click "Set City as not editable for NewRow only" button.&lt;/li&gt;&lt;li&gt;Try to edit City column. It is now not-editable.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Should you find anything that I might miss during my attempt to reproduce the reported problem, please feel free to let me know.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Changing ForceNoEdit doesn't work until focus is lost.</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Changing-ForceNoEdit-doesnt-work-until-focus-is-lost/</link><pubDate>Thu, 17 Sep 2015 18:27:56 GMT</pubDate><dc:creator>JamesM</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;&lt;p&gt;I am having an issue when trying to change the ForceNoEdit property on selected cells. I can change the property without problems, but in order for the change to take effect I have to select another row, then select the original. Once I've navigated away and back, I can edit the cells. This only happens when I allow editing and not when I disallow it. Any help would be appreciated.&lt;/p&gt;&lt;p&gt;Regards,&lt;/p&gt;&lt;p&gt;James&lt;/p&gt;</description></item></channel></rss>