﻿<?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 4 Client Calls SetSelectedIndex And SetSelectedRowByValue Fail Crash</title><link>http://www.intersoftsolutions.com/Community/WebCombo/WebCombo-4-Client-Calls-SetSelectedIndex-And-SetSelectedRowByValue-Fail-Crash/</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 4 Client Calls SetSelectedIndex And SetSelectedRowByValue Fail Crash</title><link>http://www.intersoftsolutions.com/Community/WebCombo/WebCombo-4-Client-Calls-SetSelectedIndex-And-SetSelectedRowByValue-Fail-Crash/</link><pubDate>Mon, 11 Jan 2010 05:13:22 GMT</pubDate><dc:creator>yudi</dc:creator><category>WebCombo</category><category>javascript</category><category>Client Side Events</category><category>crash</category><category>SetSelectedIndex</category><category>Client</category><description>&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;I created a test page based on your information regarding the issue. The issue happens when user directly sets the dates via the calendar and WebCombo range type selection should be automatically set specific value/text, in this case is “Custom”. Instead of set WebCombo to specific value/text, it throws “’this.Column.BaseFieldName’ is null or not an object” error message.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;I tried to simplify the issue by sets WebCombo value/text on button click client-side event. In my test page, I tried four method to set unbound WebCombo value/text, by using SetText() method; SetSelectedIndex() method; SetSelectedRowByValue() method; and by selecting the row object.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;No error happens when using all of the method and I was unable to reproduce your issue using my test page. I enclose the test page as attachment so that you can test it on your end and let me know if there is anything that I miss during my attempt to replicates your issue. you may also modify the test page and send it back to us for further investigation.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>WebCombo 4 Client Calls SetSelectedIndex And SetSelectedRowByValue Fail Crash</title><link>http://www.intersoftsolutions.com/Community/WebCombo/WebCombo-4-Client-Calls-SetSelectedIndex-And-SetSelectedRowByValue-Fail-Crash/</link><pubDate>Fri, 08 Jan 2010 09:18:58 GMT</pubDate><dc:creator>PRISMAY</dc:creator><category>WebCombo</category><category>javascript</category><category>Client Side Events</category><category>crash</category><category>SetSelectedIndex</category><category>Client</category><description>&lt;p&gt;I have a custom date control made of 3 components: WebCombo and two WebInput calendars.  The WebCombo gives the user a preset number of options that automatically set the calendars, i.e., Yesterday, Last Week, This Month, etc.&lt;/p&gt;
&lt;p&gt;When the user directly sets the dates via the calendars, then we want to automatically set the combo's range type selection to our "Custom" selection.  I'm doing that via a workaround using the code below:&lt;/p&gt;&lt;pre&gt;oIsCbo.SelectedIndex = i;
oIsCbo.SetValue(oDRT.dateRangeTypeId);
oIsCbo.SetTextBoxValue(oDRT.dateRangeTypeName);&lt;/pre&gt;

&lt;p&gt;I'm using this workaround because both SetSelectedIndex and SetSelectedRowByValue crash when called.  Both calls cause the javascript runtime error of "'this.Column.BaseFieldName' is null or not an object."  I'm using an unbound combo and all the UI elements do not post back so everything is done client-side.  We don't want a simple control like this to constantly post back on every little user change.&lt;/p&gt;
&lt;p&gt;Here's how our PrismComboBox (derives from &lt;span style="font-size: 10pt"&gt;ISNet.WebUI.WebCombo.&lt;span style="color: #2b91af"&gt;&lt;span style="color: #2b91af"&gt;WebCombo&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;) is set up:&lt;/p&gt;&lt;pre&gt;this.AllowWildCardSearch = true;
this.EnableViewState = true;
this.Items = new PrismComboBoxItems();
this.Items.ComboBox = this;
this.SelectedItem = new PrismComboBoxSelectedItem();
this.SelectedItem.ComboBox = this;
this.LayoutSettings.AllowAddItem = false;
this.LayoutSettings.AllowFloatingText = false;
this.LayoutSettings.AllowNavigationOnMouseWheel = true;
this.LayoutSettings.AllowTextWrapping = false;
this.LayoutSettings.AlwaysShowAllRowsOnDropdown = true;
this.LayoutSettings.AlwaysShowColumnHeaders = false;
this.LayoutSettings.AlwaysShowHelpButton = false;
this.LayoutSettings.AlwaysShowResultBox = false;
this.LayoutSettings.AlwaysShowSearchButton = true;
this.LayoutSettings.AutoColumnOrdering = false;
this.LayoutSettings.ComboMode = ISNet.WebUI.WebCombo.Mode.SingleColumn;
this.LayoutSettings.EnableAnimation = true;
this.LayoutSettings.EnableSlidingAnimation = true;
this.LayoutSettings.EntryMode = ISNet.WebUI.WebCombo.EntryMode.AutoComplete;
this.LayoutSettings.NoResultFoundAction = ISNet.WebUI.WebCombo.NoResultFoundAction.RevertSelection;
this.LayoutSettings.SearchIconMode = ISNet.WebUI.WebCombo.SearchMode.Text;
this.LayoutSettings.TextBoxMode = ISNet.WebUI.WebCombo.TextboxMode.Editable;
this.UseDefaultStyle = false;
this.SelectionRequired = false;
&lt;/pre&gt;

&lt;p&gt;Here's how the combo box is further configured and populated in our PrismDateRange control:&lt;/p&gt;&lt;pre&gt;m_ComboboxRangeType.ID = "ComboBoxRangeType";
m_ComboboxRangeType.AutoPostBack = AutoPostBack;
m_ComboboxRangeType.SelectedIndexChanged &amp;#43;= new EventHandler(m_ComboboxRangeType_SelectedIndexChanged);
m_ComboboxRangeType.PreRender &amp;#43;= new EventHandler(m_ComboboxRangeType_PreRender);
m_ComboboxRangeType.Enabled = this.Enabled;
m_ComboboxRangeType.DropDownRows = 50;

m_ComboboxRangeType.Width = Unit.Percentage(100);
m_ComboboxRangeType.LayoutSettings.StatusBoxVisible = false;

m_ComboboxRangeType.LayoutSettings.ResultBoxShadow = false;
m_ComboboxRangeType.LayoutSettings.ResultBoxWindowType = ISNet.WebUI.DisplayType.Normal;

m_ComboboxRangeType.Enabled = true;
m_ComboboxRangeType.insertBlankRow = false;
m_ComboboxRangeType.DataValueField = "dateRangeTypeID";
m_ComboboxRangeType.DataTextField = "dateRangeTypeName";

ISNet.WebUI.WebCombo.WebComboColumn colText = new ISNet.WebUI.WebCombo.WebComboColumn();
colText.BaseFieldName = m_ComboboxRangeType.DataTextField;
colText.Bound = false;
colText.ColumnType = ISNet.WebUI.WebCombo.ColumnType.Text;
colText.DataType = "System.String";
colText.Hidden = false;
colText.Name = m_ComboboxRangeType.DataTextField;

ISNet.WebUI.WebCombo.WebComboColumn colValue = new ISNet.WebUI.WebCombo.WebComboColumn();
colValue.BaseFieldName = m_ComboboxRangeType.DataValueField;
colValue.Bound = false;
colValue.ColumnType = ISNet.WebUI.WebCombo.ColumnType.Text;
colValue.DataType = "System.String";
colValue.Hidden = true;
colValue.RenderOnHidden = true;
colValue.Name = m_ComboboxRangeType.DataValueField;

m_ComboboxRangeType.Columns.Add(colText);
m_ComboboxRangeType.Columns.Add(colValue);

m_ComboboxRangeType.PopulateUnboundData(GetTypeTable(),false);

if (CPRISMStrLib.IsVs(ReportCategoryId))
{
    m_ComboboxRangeType.Value = CPRISMStrLib.GetStr(GetDefTable().Rows[0]["defaultDateRangeTypeID"]);
    m_ComboboxRangeType.SelectedValue = m_ComboboxRangeType.Value;
}
&lt;/pre&gt;

&lt;p&gt;I've attached a couple falsh videos of the issue while running in debug mode.  The first one shows the crash when SetSelectedIndex is hit and the value of this.Column.  The second one breaks into my javascript code and also shows the result of SetSelectedRowByDefault in the watch window as well as continuing on and the crash of SetSelectedIndex.&lt;/p&gt;
&lt;p&gt;As you can see above, the BaseFieldName is set up so I'm not sure why all that is empty on the client side, i.e., this.Column and so on.  Let me know if you need anything else.&lt;/p&gt;
&lt;p&gt;I'm in a bind to get this working please so I can really use a fast resolution.  Thanks a lot.&lt;/p&gt;</description></item></channel></rss>