Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
195
WebDropDown - adding custom attrbute
posted

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?);

}