﻿<?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 set the data of a field with EditType of NoEdit using JavaScript?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-to-set-the-data-of-a-field-with-EditType-of-NoEdit-using-JavaScript/</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 set the data of a field with EditType of NoEdit using JavaScript?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-to-set-the-data-of-a-field-with-EditType-of-NoEdit-using-JavaScript/</link><pubDate>Wed, 22 Sep 2010 22:48:26 GMT</pubDate><dc:creator>handy@intersoftpt.com</dc:creator><description>&lt;p&gt;Hello Shawn,&lt;/p&gt;&lt;p&gt;The tooltip only shows when the word length extends a cell width. Should you also see the same in your scenario?&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Handy&lt;/p&gt;</description></item><item><title>How to set the data of a field with EditType of NoEdit using JavaScript?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-to-set-the-data-of-a-field-with-EditType-of-NoEdit-using-JavaScript/</link><pubDate>Mon, 20 Sep 2010 14:07:04 GMT</pubDate><dc:creator>SAgosto</dc:creator><description>&lt;blockquote&gt;&lt;p&gt;Hello Shawn,&lt;/p&gt;&lt;p&gt;I did not face the issue in tooltip at all. Would you mind to send me a simple sample of yours?&amp;nbsp;&lt;br /&gt;FYI, I also tested with your snippet code.&lt;/p&gt;&lt;p&gt;Regards,&lt;br /&gt;Handy&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Oddly. I can't seem to reproduce in another project. I can't get the tooltip to consistantly be displayed to even see what the tooltip is.&lt;/p&gt;</description></item><item><title>How to set the data of a field with EditType of NoEdit using JavaScript?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-to-set-the-data-of-a-field-with-EditType-of-NoEdit-using-JavaScript/</link><pubDate>Sun, 19 Sep 2010 23:41:23 GMT</pubDate><dc:creator>handy@intersoftpt.com</dc:creator><description>&lt;p&gt;Hello Shawn,&lt;/p&gt;&lt;p&gt;I did not face the issue in tooltip at all. Would you mind to send me a simple sample of yours? &lt;br /&gt;FYI, I also tested with your snippet code.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Handy&lt;/p&gt;</description></item><item><title>How to set the data of a field with EditType of NoEdit using JavaScript?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-to-set-the-data-of-a-field-with-EditType-of-NoEdit-using-JavaScript/</link><pubDate>Fri, 17 Sep 2010 09:56:50 GMT</pubDate><dc:creator>SAgosto</dc:creator><description>&lt;p&gt;Fantastic! This allowed me to update the field regardless if the EditType was set to NoEdit. &lt;/p&gt;
&lt;p&gt;&lt;br /&gt;However, the textbox's tooltip still has the previous data.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;For example,&lt;/p&gt;
&lt;p&gt;Cell.SetText("Hello World", true, true) = "Hello World" and tooltip of "Hello World"&lt;/p&gt;
&lt;p&gt;Cell.SetText("", true, true) = "" and tooltip of "Hello World"&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Can you confirm?&lt;/p&gt;</description></item><item><title>How to set the data of a field with EditType of NoEdit using JavaScript?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-to-set-the-data-of-a-field-with-EditType-of-NoEdit-using-JavaScript/</link><pubDate>Thu, 16 Sep 2010 23:26:42 GMT</pubDate><dc:creator>SAgosto</dc:creator><description>&lt;blockquote&gt;&lt;p&gt;Hello Shawn,&lt;/p&gt;&lt;p&gt;Do you mean for each cell? Because we don't have EditType for row. We only have EditType for WebGrid Column in cell level.&lt;br /&gt;You should not be able to do at row level. Besides, Row object does not have SetText() method.&lt;/p&gt;&lt;p&gt;In order to do this in No Edit type, you can use SetText(). Please see the code below.&lt;/p&gt;&lt;pre&gt;function Button1_onclick() {
            var grid = ISGetObject("WebGrid1");
            grid.GetSelectedObject().ToRowObject().GetCells()[1].SetText("&lt;span style="line-height: 18px; font-family: 'segoe ui', arial, verdana, tahoma; white-space: normal; color: rgb(63,63,63)"&gt;Hello World&lt;/span&gt;", true,true);
           
        }&lt;/pre&gt;&lt;p&gt;The last parameter is &lt;b&gt;ignore edit type&lt;/b&gt; parameter. You can return &lt;b&gt;true &lt;/b&gt;or &lt;b&gt;false&lt;/b&gt;.&lt;/p&gt;&lt;p&gt;Regards,&lt;br /&gt;Handy&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;My apologies as I meant Cell when I typed Row. The last parameter sounds exactly like I need! It is not listed in the documentation anywhere so I was not aware it existed. Is there any other parameters?&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I will test in the morning.&lt;/p&gt;</description></item><item><title>How to set the data of a field with EditType of NoEdit using JavaScript?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-to-set-the-data-of-a-field-with-EditType-of-NoEdit-using-JavaScript/</link><pubDate>Thu, 16 Sep 2010 22:48:52 GMT</pubDate><dc:creator>handy@intersoftpt.com</dc:creator><description>&lt;p&gt;Hello Shawn,&lt;/p&gt;&lt;p&gt;Do you mean for each cell? Because we don't have EditType for row. We only have EditType for WebGrid Column in cell level.&lt;br /&gt;You should not be able to do at row level. Besides, Row object does not have SetText() method.&lt;/p&gt;
&lt;p&gt;In order to do this in No Edit type, you can use SetText(). Please see the code below.&lt;/p&gt;
&lt;p /&gt;&lt;pre&gt;function Button1_onclick() {
            var grid = ISGetObject("WebGrid1");
            grid.GetSelectedObject().ToRowObject().GetCells()[1].SetText("&lt;span style="color: rgb(63, 63, 63); font-family: 'segoe ui', arial, verdana, tahoma; white-space: normal; line-height: 18px; "&gt;Hello World&lt;/span&gt;", true,true);
           
        }&lt;/pre&gt;
&lt;p&gt;The last parameter is &lt;b&gt;ignore edit type&lt;/b&gt; parameter. You can return &lt;b&gt;true &lt;/b&gt;or &lt;b&gt;false&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Handy&lt;/p&gt;
&lt;p /&gt;</description></item><item><title>How to set the data of a field with EditType of NoEdit using JavaScript?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-to-set-the-data-of-a-field-with-EditType-of-NoEdit-using-JavaScript/</link><pubDate>Thu, 16 Sep 2010 14:08:20 GMT</pubDate><dc:creator>SAgosto</dc:creator><description>&lt;p&gt;I have a field with EditType of NoEdit to prevent the user from editing this field.  However, I still need to set this field using JavaScript.  This is possible using the Cell's SetChanges() Method but not the Cell's SetText() method.  However, I noticed some weirdness with the SetChanges() Method where it would clear the field but leave the underlying textbox's tooltip showing previous data. This only seemed to occur when setting the text to "". &lt;/p&gt;
&lt;p&gt;&lt;br /&gt;For example,&lt;/p&gt;
&lt;p&gt;Cell.SetChanges("Hello World") = "Hello World" and tooltip of "Hello World"&lt;/p&gt;
&lt;p&gt;Cell.SetChanges("") = "" and tooltip of "Hello World"&lt;/p&gt;
&lt;p&gt;Cell.SetText("Hello World") = "" and tooltip of "" for field's with EditType=NoEdit&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;The Cell'sSetForceNoEdit() method generates an exception "this.CellElement" is null or not an object&lt;/p&gt;</description></item></channel></rss>