﻿<?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 retrieve WebGrid's DropDownlist field?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-to-retrieve-WebGrids-DropDownlist-field/</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 retrieve WebGrid's DropDownlist field?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-to-retrieve-WebGrids-DropDownlist-field/</link><pubDate>Wed, 01 Dec 2010 09:45:55 GMT</pubDate><dc:creator>SAgosto</dc:creator><description>&lt;blockquote&gt;&lt;p&gt;If you are trying to retrieve the dropdown element during OnEnterEditMode you could use the element property of the editObject parameter. Here is the snippet:&lt;/p&gt;&lt;pre&gt;function _WebGrid_OnEnterEditMode(controlId, tblName, editObject) {&lt;br /&gt;&lt;br /&gt;    var dropDown = editObject.element;&lt;br /&gt;&lt;br /&gt;    ...&lt;br /&gt;}&lt;/pre&gt;&lt;p&gt;If not, by my analysis the dropdown element will be assigned an ID with [WebGridName]__[ColumnName], you could use document.getElementById method to retrieve the element. For example if you named your WebGrid WebGrid1 and the column is Company, the method will be:&lt;br /&gt;&lt;/p&gt;&lt;pre&gt;document.getElementById("WebGrid1__Company")&lt;/pre&gt;&lt;p&gt;Unfortunately, as far as I know the infromation is not available in WebGridCell object. &lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;br /&gt;Using document.getElementbyId or JQuery using the provided naming convention worked. It would be a nice feature request to include this in the object via property and/or method in the future.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;</description></item><item><title>How to retrieve WebGrid's DropDownlist field?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-to-retrieve-WebGrids-DropDownlist-field/</link><pubDate>Tue, 30 Nov 2010 10:20:57 GMT</pubDate><dc:creator>handy@intersoftpt.com</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;You can use Glenn approach or retrieve the dropdown element by attaching onchange event.&lt;/p&gt;
&lt;p&gt;e.g&lt;/p&gt;&lt;pre&gt;  function DropDownSelect()
        {
            var ddObject = document.getElementById("WebGrid1_Company");
            var grid = ISGetObject("WebGrid1");

            alert("Text: " &amp;#43; ddObject.options[ddObject.selectedIndex].innerText &amp;#43; "\nValue: " &amp;#43; ddObject.options[ddObject.selectedIndex].value);
        }

        function AttachEvent()
        {
            var dd = document.getElementById("WebGrid1_Company");
            dd.attachEvent('onchange', DropDownSelect);
        }

        function WebGrid1_OnInitialize(controlId)
        {
            AttachEvent();
        }&lt;/pre&gt;
&lt;p&gt;Note: If you have a trouble in finding dropdownlist id, you can try to use view source after load the page.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Handy&lt;/p&gt;</description></item><item><title>How to retrieve WebGrid's DropDownlist field?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-to-retrieve-WebGrids-DropDownlist-field/</link><pubDate>Mon, 29 Nov 2010 23:22:54 GMT</pubDate><dc:creator>Glayaar</dc:creator><description>&lt;p&gt;If you are trying to retrieve the dropdown element during OnEnterEditMode you could use the element property of the editObject parameter. Here is the snippet:&lt;/p&gt;&lt;pre&gt;function _WebGrid_OnEnterEditMode(controlId, tblName, editObject) {&lt;br /&gt;&lt;br /&gt;    var dropDown = editObject.element;&lt;br /&gt;&lt;br /&gt;    ...&lt;br /&gt;}&lt;/pre&gt;&lt;p&gt;If not, by my analysis the dropdown element will be assigned an ID with [WebGridName]__[ColumnName], you could use document.getElementById method to retrieve the element. For example if you named your WebGrid WebGrid1 and the column is Company, the method will be:&lt;br /&gt;&lt;/p&gt;&lt;pre&gt;document.getElementById("WebGrid1__Company")&lt;/pre&gt;
&lt;p&gt;Unfortunately, as far as I know the infromation is not available in WebGridCell object. &lt;br /&gt;&lt;/p&gt;</description></item><item><title>How to retrieve WebGrid's DropDownlist field?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-to-retrieve-WebGrids-DropDownlist-field/</link><pubDate>Mon, 29 Nov 2010 14:15:42 GMT</pubDate><dc:creator>SAgosto</dc:creator><description>&lt;p&gt;Can someone show me how to retrieve a WebGrid's DropDownlist field? I am able to retrieve the WebGridCell by Name and then use the GetElement method to retrieve the DOM object but I don't seem to find the underlying DropDownList control?&lt;/p&gt;</description></item></channel></rss>