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
65
How add item on client side??
posted

I can't add a new item in client side...

Load the webdropDown..

var cboFormat = $find("<%= WebDropDown_Checkbox.ClientID %>");
var comboItem = new ???

Please, help..

Parents
No Data
Reply
  • 24671
    Suggested Answer
    posted

    Hi,

    http://samples.infragistics.com => 2009.1 => WebDropDown => Client Events sample

      function addItem(e) {
                var combo = $find('<%= myDropDown.ClientID %>');
                var textbox = $get("<%=txtNewItem.ClientID %>");
    
                if (textbox.value != "") {
                    var item = combo.get_items().createItem();
                    item.set_text(textbox.value);
                    item.set_value(textbox.value);
                    combo.get_items().add(item);
                }
            }
    
    
    Hope it helps,
    Angel 

Children