Mar 12, 2010, 1:00 PM
[CLOSED] [1.0] Custom Control Question
Hello,
I'm working on my own custom control and would like the following FormID property included in the config options sent to the constructor in JavaScript.
Can you give me a quick nudge in the right direction? As always your help is much appreciated :)
Cheers
I'm working on my own custom control and would like the following FormID property included in the config options sent to the constructor in JavaScript.
[Meta]
public class CustomControl : Ext.Net.Panel
{
[Meta]
[ConfigOption("formID")]
[NotifyParentProperty(true)]
public virtual string FormID
{
get
{
return (String) this.ViewState["FormID"] ?? "";
}
set
{
this.ViewState["FormID"] = value;
}
}
/// <summary>
/// Gets the InstanceOf.
/// </summary>
public override string InstanceOf
{
get
{
return "Ext.ux.CustomControl";
}
}
/// <summary>
/// Gets the XType.
/// </summary>
public override string XType
{
get
{
return "customControl";
}
}
}
I was thinking if I used the ConfigOptions attribute it would be automatically included in what's passed to the constructor, however all it generates is the following:new Ext.ux.CustomControl({id:"CustomControl1",renderTo:"CustomControl_Container",width:400,border:false});
It didn't include the FormID property.Can you give me a quick nudge in the right direction? As always your help is much appreciated :)
Cheers