L
Luciano Criscola
Hi all,
I am building a custom control and I add one primitive type (MyProperty1)
and one MyClass type (MyProperty2) as public properties
I had to make MyClass implement the IComponent interface so it would show
properly in the properties window ( It show the name of the property and a +
sign with al the properties of MyClass as children)
When a make some change in the properties window to MyProperty1, the new
values are reflected int the HTML view MyProperty1="MyValue" but when I do
the same with the object property instead of seeing
MyProperty2-MyProperty3="MyValue" I see nothing. But if I add manually
MyProperty2-MyProperty3="MyValue" in the HTML view, I see the change in the
property window.
Did I make my self clear...??
Well thanks anyway.
Here is the code
//--- B E G I
N---------------------------------------------------------------------------
---------------------------------
using System;
using System.ComponentModel;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace MyNameSpace
{
public class MyClass :IComponent
{
private string myProperty3= "";
private string myProperty4= "";
public string MyProperty3
{
get {return myProperty3;}
set {myProperty3=value;}
}
public string MyProperty4
{
get {return myProperty4;}
set {myProperty4=value;}
}
#region IComponent Members
public event System.EventHandler Disposed;
public ISite Site
{
get
{
// TODO: Add MyClass.Site getter implementation
return null;
}
set
{
// TODO: Add MyClass.Site setter implementation
}
}
#endregion
#region IDisposable Members
public void Dispose()
{
// TODO: Add MyClass.Dispose implementation
}
#endregion
}
public class MyCustomControl ataGrid
{
private string myProperty1="";
private MyClass myProperty2= new MyClass();
public string MyProperty1
{
get {return myProperty1;}
set {myProperty1=value;}
}
public MyClass MyProperty2
{
get { return myProperty2 ;}
set { myProperty2=value;}
}
}
}
//----E N
D---------------------------------------------------------------------------
I am building a custom control and I add one primitive type (MyProperty1)
and one MyClass type (MyProperty2) as public properties
I had to make MyClass implement the IComponent interface so it would show
properly in the properties window ( It show the name of the property and a +
sign with al the properties of MyClass as children)
When a make some change in the properties window to MyProperty1, the new
values are reflected int the HTML view MyProperty1="MyValue" but when I do
the same with the object property instead of seeing
MyProperty2-MyProperty3="MyValue" I see nothing. But if I add manually
MyProperty2-MyProperty3="MyValue" in the HTML view, I see the change in the
property window.
Did I make my self clear...??
Well thanks anyway.
Here is the code
//--- B E G I
N---------------------------------------------------------------------------
---------------------------------
using System;
using System.ComponentModel;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace MyNameSpace
{
public class MyClass :IComponent
{
private string myProperty3= "";
private string myProperty4= "";
public string MyProperty3
{
get {return myProperty3;}
set {myProperty3=value;}
}
public string MyProperty4
{
get {return myProperty4;}
set {myProperty4=value;}
}
#region IComponent Members
public event System.EventHandler Disposed;
public ISite Site
{
get
{
// TODO: Add MyClass.Site getter implementation
return null;
}
set
{
// TODO: Add MyClass.Site setter implementation
}
}
#endregion
#region IDisposable Members
public void Dispose()
{
// TODO: Add MyClass.Dispose implementation
}
#endregion
}
public class MyCustomControl ataGrid
{
private string myProperty1="";
private MyClass myProperty2= new MyClass();
public string MyProperty1
{
get {return myProperty1;}
set {myProperty1=value;}
}
public MyClass MyProperty2
{
get { return myProperty2 ;}
set { myProperty2=value;}
}
}
}
//----E N
D---------------------------------------------------------------------------