﻿<?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 - Hide "new row" if AllowAddNew = AddNew.Yes</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Hide-new-row-if-AllowAddNew--AddNewYes/</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>Hide "new row" if AllowAddNew = AddNew.Yes</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Hide-new-row-if-AllowAddNew--AddNewYes/</link><pubDate>Thu, 01 Oct 2009 01:32:54 GMT</pubDate><dc:creator>Michael</dc:creator><description>&lt;p&gt;Hi Handy&lt;/p&gt;
&lt;div id="result_box" dir="ltr"&gt;I found out why it did not work correctly.&lt;/div&gt;
&lt;p&gt;If you set AllowFilter = Filter.Yes you must write following code:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;WebGrid1.RootTable.GetElement(WG40.COLHEADER, WG40.HTMLROW).childNodes[0].childNodes[&lt;span style="background-color: #ffff00"&gt;3&lt;/span&gt;].style.display = "none";&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Your second tip always works:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;WebGrid1.RootTable.GetNewRow().style.display = "none";&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Michael&lt;/p&gt;</description></item><item><title>Hide "new row" if AllowAddNew = AddNew.Yes</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Hide-new-row-if-AllowAddNew--AddNewYes/</link><pubDate>Thu, 01 Oct 2009 00:56:39 GMT</pubDate><dc:creator>handy@intersoftpt.com</dc:creator><description>&lt;p&gt;Hi Michael,&lt;/p&gt;&lt;p&gt;Weird, it works on me. Or if you want it more simple, you can add the code below. Hope this helps.&lt;/p&gt;
&lt;p /&gt;&lt;pre&gt;function WebGrid1_OnAfterInitialize(controlId)
{
	var WebGrid1 = ISGetObject(controlId);
	WebGrid1.RootTable.GetNewRow().style.display = "none";
	return true;
}&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p /&gt;
&lt;p&gt;Regards,&lt;br /&gt;Handy&lt;/p&gt;</description></item><item><title>Hide "new row" if AllowAddNew = AddNew.Yes</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Hide-new-row-if-AllowAddNew--AddNewYes/</link><pubDate>Wed, 30 Sep 2009 08:36:26 GMT</pubDate><dc:creator>Michael</dc:creator><description>&lt;p&gt;Hi Handy&lt;/p&gt;
&lt;p&gt;Nothing happens! Display is already set to none!&lt;/p&gt;
&lt;p&gt;Maybe the wrong Element?&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Michael&lt;/p&gt;</description></item><item><title>Hide "new row" if AllowAddNew = AddNew.Yes</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Hide-new-row-if-AllowAddNew--AddNewYes/</link><pubDate>Wed, 30 Sep 2009 05:50:37 GMT</pubDate><dc:creator>handy@intersoftpt.com</dc:creator><description>&lt;p&gt;You will need to get new row element and set display none style. I suggest you to put the code &lt;em&gt;&lt;strong&gt;OnAfterInitialize&lt;/strong&gt;&lt;/em&gt; client side evet.&lt;/p&gt;&lt;pre&gt; function WebGrid1_OnAfterInitialize()&lt;br /&gt; {&lt;br /&gt;        var grid=ISGetObject("WebGrid1");&lt;br /&gt;        grid.RootTable.GetElement(WG40.COLHEADER, WG40.HTMLROW).childNodes[0].childNodes[1].style.display="none";&lt;br /&gt; }&lt;/pre&gt;&lt;p&gt;Hope this helps.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Handy&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Hide "new row" if AllowAddNew = AddNew.Yes</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Hide-new-row-if-AllowAddNew--AddNewYes/</link><pubDate>Wed, 30 Sep 2009 04:58:43 GMT</pubDate><dc:creator>Michael</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I add new records programmatically.&lt;/p&gt;
&lt;p&gt;I have found no way to hide "new row" if AllowAddNew = AddNew.Yes.&lt;/p&gt;
&lt;p&gt;Perhaps it is a new feature request (e.g. NewRowVisible)?&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Michael&lt;/p&gt;</description></item></channel></rss>