If I add a custom attribute to my DropDownItems using
Dim dd As New DropDownItem("test", value)
dd.Attributes.Add("CustomAttribute", CustomValue))
how do I access this attribute client-side? And is there any CSOM documentation for what all various controls methods, properties, etc.?
var wdd = $find("WebDropDown");
for (var i = 0; i < wdd.get_items().getLength(); i++) {
alert(wdd.get_items().getItem(i));
alert(typeof wdd.get_items().getItem(i));
alert(wdd.get_items().getItem(i).attribute);
alert(wdd.get_items().getItem(I).properties?);
}
Hello dtwilliams,
I will be happy to assist you with your question.
In the code you've provided, I see that you are instantiating a new DropDownItem and adding a custom attribute to this object. However, I don't see this DropDownItem instance added to the DropDown itself. If this is the case, the use of your JS logic wont work since the object with the custom attribute is not available off of the WebDropDown. I recommend verifying that this object has been added to the WebDropDown's Items collection before using your JS logic to get the custom attribute's value.
Also, Infragistics does provide CSOM documentation. Please use the following links to see our documentation on our website:Infragistics ASP.NET 2013.2 documentation:http://help.infragistics.com/doc/ASPNET/2013.2/CLR4.0/?page=Web_NetAdvantage_Web_Client_ASPNET.html
Client-Sid Object Model documentation:http://help.infragistics.com/doc/ASPNET/2013.2/CLR4.0/?page=Web_Client_Side_Object_Model_CSOM_Reference_Guide.html
CSOM documentation for WebDropDownhttp://help.infragistics.com/doc/ASPNET/2013.2/CLR4.0/?page=WebDropDown~Infragistics.Web.UI_namespace.html
Please let me know if you have any questions regarding this matter.