I am using MetaBuilders.ComboBox[^] and recently found that I am not able to specify SelectedValue in Page_OnLoad event.
The html list has “selected“ as expected , but text box is not populated with selected value.
It is required to add SelectedValue to the MetaBuilders.WebControls.ComboBox.
///
/// Overrides .
/// Should be overridden to addition to SelectedIndex
///
public override string SelectedValue
{
get
{
return base.SelectedValue;
}
set
{
base.SelectedValue = value;
// this.isLoaded is used in SelectedIndex to ensure special
//processing when called from LoadPostData
// not required in SelectedValue property
this.Text = SelectedValue;
}
}
You need to download MetaBuilders.ComboBox[^] from
http://www.metabuilders.com/Tools/ComboBox.aspx
and add the SelectedValue code to the MetaBuilders.WebControls.ComboBox class in ComboBox.cs file.
Then compile the project and use DLL in the same way as original MetaBuilders combo-box can be used.
See
here another fix for
MetaBuilders.WebControls.ComboBox, which is important if you use SmartNavigation