ItemCollection edited client side not available serverside

2 posts, 0 answers
  1. Timothy
    Timothy avatar
    6 posts
    Member since:
    Dec 2014

    Posted 25 Dec 2014 Link to this post

    I've been able to edit the collection of client side items of the drop down list.
    My problem is, these edits aren't accessible on the server side.
    When a postback occurs, I only see the original list item collection.

    I don't see what I've done wrong. Here's what I've got so far:
    var ddl = $find("<%=_ddlLidsIndicators.ClientID%>");
    ddl.get_items().clear();
     
    var selectItem = new Telerik.Web.UI.DropDownListItem();
    selectItem.set_text("Select...");
    ddl.get_items().add(selectItem);
     
    $.each(data, function (index, value) {
        var newItem = new Telerik.Web.UI.DropDownListItem();
        newItem.set_text(value);
        newItem.set_value(index);
        ddl.get_items().add(newItem);
    });
     
    var otherItem = new Telerik.Web.UI.DropDownListItem();
    otherItem.set_text("Other");
    ddl.get_items().add(otherItem);
     
    ddl.commitChanges();
  2. Timothy
    Timothy avatar
    6 posts
    Member since:
    Dec 2014

    Posted 25 Dec 2014 in reply to Timothy Link to this post

    duplicate post. please delete.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top