Rank: Advanced Member Groups: Member
Joined: 3/9/2010 Posts: 119
|
I have a combobox that uses a listbox. The listbox's header and item templates a designed to show 2 columns and the datasource is a datatable. The controls operate properly but when I try to read the listbox’s selectedindex or seleteditem.value from javascript or on postback the values are -1 and null respectively. How can I get at these values?
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, You will need to use our client side JavaScript interface to access the ListBox control: http://www.essentialobjects.com/doc/1/jsdoc.public.listbox.aspxIf you are not familiar with the client side JavaScript interface, you will need to take a look of this: http://www.essentialobjects.com/doc/1/clientapi_howto.aspxThanks!
|
Rank: Advanced Member Groups: Member
Joined: 3/9/2010 Posts: 119
|
When I use the following I the the error "Microsoft JScript runtime error: Object doesn't support this property or method"
Code: HTML/ASPX
var item = document.getElementById("<%=ListBox1.ClientID %>").getSelectedItem();
I also tried the following with the same result
Code: HTML/ASPX
var list = document.getElementById("<%=ListBox1.ClientID %>");
var item = list.getSelectedItem();
|