|
#region Using
using System;
using System.Collections;
using System.Collections.Generic;
using System.Web.UI.WebControls;
#endregion
namespace NetMX.WebUI.WebControls
{
public class ListValueEditControl : DropDownList, IValueEditControl
{
public ListValueEditControl(string defaultValue, IEnumerable values)
{
foreach (object val in values)
{
string name = val.ToString();
Items.Add(new ListItem(name, name));
}
if (defaultValue != null)
{
SelectedValue = defaultValue;
}
}
#region IValueEditControl Members
public string Value
{
get
{
return SelectedValue;
}
set
{
SelectedValue = value;
}
}
#endregion
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.