[
)]
{
SNDTextBox()
.Enabled)
))
;
}
Mandatory
get
)
];
s;
else
set
ViewState[
[System.Security.Permissions.
writer)
(Mandatory)
writer.AddAttribute(
);
.AddAttributesToRender(writer);
Hi Sai,
That is correct. Majority of controls in Infragistics.WebUI do not use that feature of WebControl. There are several reasons for that.
Rendering is performed by following call
protected override void Render(HtmlTextWriter output){ ... this.GetRenderer().Render(output);}Where GetRender() returns renderer for specific state of user machine (UpLevel or DownLevel). That renderer renders explicitly to HtmlTextWriter all tags, attributes, scripts, hidden fields, etc..
Those "renderer" classes and members are private, so, extended classes can not modify them and their logic.
Note: custom attributes are rendered by something like
System.Web.UI.AttributeCollection attrs = this.owner.Attributes;foreach(string key in attrs.Keys){ this.w(" "); this.w(key); this.w("=\""); this.w(attrs[key]); this.w("\"");}where w is call to output.Write...
So then how can I add a Property to them?
Gary
With the WebNumericEdit i can do that in the OnPreRender event of that object.
It does not work in the OnPreRender of WebDateChooser. I do not want to put it externally
These are objects that are supposed to be able to do this . This is a severe bug in this object.
It means the WebDatechooser is unusable to me.
Hi Gary,
It should work for WebDateChooser same way as for WebNumericEdit. Attributes are rendered within Render event, so if a property was modified within OnPreRender, then it should have effect by render time. I tested codes below within OnLoad and within WebDateChooser.PreRender. Both generated same html.
Codes:this.WebDateChooser1.Attributes.Add("Mandatory", "true");
Generated html:<table id='WebDateChooser1' cellpadding="0" cellspacing="0" style="..." Mandatory="true">
Yes. I was loopiing through all Form elements to find it and its not a form element. So i also loop through Table collections and found it.
Thanks Gary
Hi
How about WebCombo. I tried in webcombo and cant seem to get the attributes to work.
Gary,
Would that be an option for you to use WebDropDown instead? Thanks.
Hello Gary,
I have opened a new customer case for you regarding this.
Thank you for using Infragistics.
1024x768 Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4
Sincerely,
Tsvetelina
Developer Support Engineer
Infragistics
www.infragistics.com/support
You can configure it to be multi column through templates, and it will be much lighter than webcombo. Take a look at this sample, second dropdown is the case I am talking about:
http://samples.infragistics.com/2009.2/WebFeatureBrowser/contents.aspx?showCode=true&t=WebDropDown/WebDropDownTemplates.aspx~srcview.aspx?path=~srcview.aspx?path=WebDropDown/WebDropDownTemplates.src
You are correct about the attributes. I will ask DS to create a bug report for it. Thanks.
WebDropDown does not have the multi-column capability does it? Plus should not any of these controls have the ability to add attributes?