﻿<?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 - WebCombo - WebCombo SelectRow property throws XmlException "Root element is missing"</title><link>http://www.intersoftsolutions.com/Community/WebCombo/WebCombo-SelectRow-property-throws-XmlException-Root-element-is-missing/</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>WebCombo SelectRow property throws XmlException "Root element is missing"</title><link>http://www.intersoftsolutions.com/Community/WebCombo/WebCombo-SelectRow-property-throws-XmlException-Root-element-is-missing/</link><pubDate>Tue, 03 May 2011 04:44:53 GMT</pubDate><dc:creator>RobertPehrson</dc:creator><description>&lt;p&gt;Thanks for your explanation, Riendy.  This is in some code that I have inherited using the Name property of SelectedRow, but I'm sure I can manage without it and use just Text and Value. &lt;/p&gt;</description></item><item><title>WebCombo SelectRow property throws XmlException "Root element is missing"</title><link>http://www.intersoftsolutions.com/Community/WebCombo/WebCombo-SelectRow-property-throws-XmlException-Root-element-is-missing/</link><pubDate>Fri, 29 Apr 2011 05:18:33 GMT</pubDate><dc:creator>Riendy</dc:creator><description>&lt;p&gt;Hi Robert,&lt;/p&gt;&lt;p&gt;I have replicate your issue. &lt;/p&gt;
&lt;p&gt;WebCombo's behavior will render when you click DropDownList. So you can't use those code before DropDownList clicked. If you want to get a value which you selected, why don't you use :&lt;/p&gt;
&lt;p /&gt;&lt;pre&gt;WebCombo2.Value;&lt;/pre&gt;
&lt;p&gt;or you have another scenario ?&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Hi Robert,&lt;/p&gt;
&lt;p&gt;I can replicate your issue in here. Unfortunately, you couldn't use the code to select row in PageLoad event. It will return an error because the rows element have not been created yet. The element would be created when you click on DropDown or when the ResultBox popped up.&lt;/p&gt;
&lt;p&gt;Is there anything that you need to achieve with the current code? If you only want to set the value, you can simply to use WebCombo2.Value directly.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Hope this helps you Robert.&lt;/p&gt;
&lt;p&gt;Riendy&lt;/p&gt;
&lt;p /&gt;</description></item><item><title>WebCombo SelectRow property throws XmlException "Root element is missing"</title><link>http://www.intersoftsolutions.com/Community/WebCombo/WebCombo-SelectRow-property-throws-XmlException-Root-element-is-missing/</link><pubDate>Thu, 28 Apr 2011 04:08:54 GMT</pubDate><dc:creator>RobertPehrson</dc:creator><description>&lt;p&gt;Hi Riendy,&lt;/p&gt;
&lt;p&gt;I thought my sample was attached as a file, but I see that in fact it's not - apologies!  Here it is.  This is the code behind for a page that includes PlaceHolder1.&lt;/p&gt;
&lt;p&gt;using System;&lt;br /&gt;using System.Data;&lt;br /&gt;using System.Collections;&lt;br /&gt;using System.Web;&lt;br /&gt;using System.Web.Security;&lt;br /&gt;using System.Web.UI;&lt;br /&gt;using System.Web.UI.WebControls;&lt;br /&gt;&lt;br /&gt;public partial class cs_WebCombo_ResultBoxWorked : System.Web.UI.Page&lt;br /&gt;{&lt;br /&gt;    ISNet.WebUI.WebCombo.WebCombo WebCombo2;&lt;br /&gt;&lt;br /&gt;    protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;    {&lt;br /&gt;        WebCombo2 = new ISNet.WebUI.WebCombo.WebCombo();&lt;br /&gt;        PlaceHolder1.Controls.Add(WebCombo2);&lt;br /&gt;&lt;br /&gt;        WebCombo2.InitializeDataSource &amp;#43;= OnInitializeDataSource;&lt;br /&gt;&lt;br /&gt;        if (!IsPostBack)&lt;br /&gt;        {&lt;br /&gt;            WebCombo2.DataTextField = "FirstColumn";&lt;br /&gt;            WebCombo2.DataValueField = "SecondColumn";&lt;br /&gt;            WebCombo2.AllowAutoPostback = true;&lt;br /&gt;            WebCombo2.AllowAutoDataCaching = true;&lt;br /&gt;            WebCombo2.UseDefaultStyle = true;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        var r = WebCombo2.SelectedRow; // this throws XmlException "Root element is missing" on the second drop-down&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    private void OnInitializeDataSource(object sender, ISNet.WebUI.WebCombo.DataSourceEventArgs eOriginal)&lt;br /&gt;    {&lt;br /&gt;        DataTable dt = new DataTable();&lt;br /&gt;        dt.TableName = "TestData";&lt;br /&gt;        dt.Columns.Add("FirstColumn", typeof(string));&lt;br /&gt;        dt.Columns.Add("SecondColumn", typeof(string));&lt;br /&gt;&lt;br /&gt;        dt.Rows.Add("one1", "one2");&lt;br /&gt;        dt.Rows.Add("two1", "two2");&lt;br /&gt;&lt;br /&gt;        eOriginal.DataSource = dt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/p&gt;
</description></item><item><title>WebCombo SelectRow property throws XmlException "Root element is missing"</title><link>http://www.intersoftsolutions.com/Community/WebCombo/WebCombo-SelectRow-property-throws-XmlException-Root-element-is-missing/</link><pubDate>Wed, 27 Apr 2011 03:03:16 GMT</pubDate><dc:creator>Riendy</dc:creator><description>&lt;div&gt;Hello Robert&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;I tried in a simple sample based on your issue but I could not replicate it. &lt;/div&gt;
&lt;div&gt;Would you like to attach a sample ?&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;Regards,&lt;/div&gt;
&lt;div&gt;Riendy&lt;/div&gt;</description></item><item><title>WebCombo SelectRow property throws XmlException "Root element is missing"</title><link>http://www.intersoftsolutions.com/Community/WebCombo/WebCombo-SelectRow-property-throws-XmlException-Root-element-is-missing/</link><pubDate>Thu, 21 Apr 2011 05:32:16 GMT</pubDate><dc:creator>RobertPehrson</dc:creator><description>&lt;p&gt;I have a dynamically created WebCombo.  The user is able to select an entry in the drop-down list, but if the drop-down is opened a second time, the SelectRow property throws XmlException "Root element is missing",&lt;/p&gt;
&lt;p&gt;I've distilled the problem into the attached ASP.NET code behind.  It needs a page with PlaceHolder1 to add WebCombo2 to.  When you run it, there's no problem selecting an entry the first time, but if you open the drop-down a second time  &lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;WebCombo2.SelectedRow &lt;/span&gt;&lt;/span&gt;throws the exception.  &lt;/p&gt;</description></item></channel></rss>