﻿<?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 change the value of the dropdownlist after adding a new row</title><link>http://www.intersoftsolutions.com/Community/WebGrid/how-to-change-the-value-of-the-dropdownlist-after-adding-a-new-row/</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 change the value of the dropdownlist after adding a new row</title><link>http://www.intersoftsolutions.com/Community/WebGrid/how-to-change-the-value-of-the-dropdownlist-after-adding-a-new-row/</link><pubDate>Thu, 22 Nov 2012 22:30:01 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;In my opinion, we need to enable AllowAddItem property of WebCombo and assign a JS function for the OnAddItem client side event. This event fired when an item is about to be added.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;You may try to set the text to external in this JS function before the return true line. Please feel free to let me know whether this helps or not.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>how to change the value of the dropdownlist after adding a new row</title><link>http://www.intersoftsolutions.com/Community/WebGrid/how-to-change-the-value-of-the-dropdownlist-after-adding-a-new-row/</link><pubDate>Thu, 22 Nov 2012 02:02:30 GMT</pubDate><dc:creator>macedes</dc:creator><description>&lt;p&gt;thank you but i must check if the value that i entered in the webcombo exists in the datasource. &lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;when i enter a value it autocomplete it and the status is internal, but when i enter a value that is not in the datasource the status should change to external before adding. &lt;/p&gt;</description></item><item><title>how to change the value of the dropdownlist after adding a new row</title><link>http://www.intersoftsolutions.com/Community/WebGrid/how-to-change-the-value-of-the-dropdownlist-after-adding-a-new-row/</link><pubDate>Wed, 21 Nov 2012 22:50:45 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;You can try to use the OnBeforeAdd client side event of WebGrid. It is the client side (JavaScript) function that will be invoked before new row request is invoked.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;In this event, you can check whether column NAME or EMAIL is set or not. If they are set, call the SetText and SetValue method to STATUS column.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;Example:&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;function WebGrid1_OnBeforeAdd(controlId, tblName, rowObject)
{
    var WebGrid1 = ISGetObject("WebGrid1");
    var NameCell = rowObject.Cells.GetNamedItem("Name");
    var EmailCell = rowObject.Cells.GetNamedItem("Email");
    var StatusCell = rowObject.Cells.GetNamedItem("StatusCell");
    if (NameCell.Value != "" &amp;amp;&amp;amp; EmailCell.Value != "")
    {
        StatusCell.SetText("Internal");
        StatusCell.SetValue("1");
    }
    else
    {
        StatusCell.SetText("External");
        StatusCell.SetValue("2");
    }
            
    return true;
}&lt;/pre&gt;
&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;Hope this helps.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>how to change the value of the dropdownlist after adding a new row</title><link>http://www.intersoftsolutions.com/Community/WebGrid/how-to-change-the-value-of-the-dropdownlist-after-adding-a-new-row/</link><pubDate>Wed, 21 Nov 2012 06:11:07 GMT</pubDate><dc:creator>macedes</dc:creator><description>&lt;p&gt;Hello, i have 3 coloums in my webgrid: &lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 10pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 10pt;"&gt;STATUS             NAME                  EMAIL&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;(Dropdownlist)             (Webcombo)                         (Webcombo)&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;the status is: external or internal. &lt;/p&gt;
&lt;p&gt;wenn i add a new row and the webcombo is not empty i want to set the status to internal. &lt;/p&gt;
&lt;p&gt;when the webcombos are empty i want to set the status to external.&lt;/p&gt;
&lt;p&gt;is that possible? &lt;/p&gt;
&lt;p&gt;thanks in advance for your help&lt;/p&gt;</description></item></channel></rss>