Error adding items manually

2 posts, 0 answers
  1. Marcel
    Marcel avatar
    8 posts
    Member since:
    Dec 2012

    Posted 20 Dec 2012 Link to this post

    Hi there,

    I am struggling to insert items to the RadComboBox.

    I use the following code



    void cbLocation_DataBound(object sender, EventArgs e)


    //fill radcombobox



    new RadComboBoxItem("<Make choice>", ""));


    new RadComboBoxItem("EPO", "EPO"));


    new RadComboBoxItem("PDC", "PDC"));


    I get the following error when I click the Update or Cancel button in the Edit form:
    Error: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500

    Do you have any idea why the error occurs?



  2. Kevin
    Kevin avatar
    360 posts
    Member since:
    Jul 2012

    Posted 20 Dec 2012 Link to this post

    Hello Marcel,

    Are you updating this control using ajax? If so, is this control not ajaxified by a RadAjaxPanel or RadAjaxManager or UpdatePanel? If not, you will need to in order to modify it using ajax.

    Also, I would advise adding the items in the RadComboBox's load event, rather than the DataBound event.

    I hope that helps.
Back to Top