R
rotsj
Hello,
I would like to make my own dropdownlist and add a collection as a generic
List.
When I enter items @ designtime, @ runtime they are gone.
Can anyone tell me please what the problem is?
This is my code:
[ToolboxBitmap(typeof(DropDownList))]
[ToolboxData("<{0}:MaxDropDownList runat=server></{0}:MaxDropDownList>")]
public class MaxDropDownList : System.Web.UI.WebControls.DropDownList,
IMaxControl
{
private List<GroupRights> _GroupRights = new List<GroupRights>();
[Category("Rights")]
[Editor("System.Web.UI.Design.WebControls.ListItemsCollectionEditor,System.Design,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a",
typeof(UITypeEditor))]
public List<GroupRights> Rights
{
get
{
return _GroupRights;
}
set
{
_GroupRights = value;
ViewState["Rights"] = Rights;
}
}
}
Thanx in advance,
Rotsj
I would like to make my own dropdownlist and add a collection as a generic
List.
When I enter items @ designtime, @ runtime they are gone.
Can anyone tell me please what the problem is?
This is my code:
[ToolboxBitmap(typeof(DropDownList))]
[ToolboxData("<{0}:MaxDropDownList runat=server></{0}:MaxDropDownList>")]
public class MaxDropDownList : System.Web.UI.WebControls.DropDownList,
IMaxControl
{
private List<GroupRights> _GroupRights = new List<GroupRights>();
[Category("Rights")]
[Editor("System.Web.UI.Design.WebControls.ListItemsCollectionEditor,System.Design,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a",
typeof(UITypeEditor))]
public List<GroupRights> Rights
{
get
{
return _GroupRights;
}
set
{
_GroupRights = value;
ViewState["Rights"] = Rights;
}
}
}
Thanx in advance,
Rotsj