After postback RadCombobox items not load - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

After postback RadCombobox items not load

  • After postback RadCombobox items not load
  • Good evening.
    I have a problem with load viewstate data in Sitefinity 4.1 SP3. I am developing a control in Web project in Visual Studio 2010, which includes RadComboBox. Items in RadComboBox adding in following:

    protected void RadComboBox1_Load(object sender, EventArgs e)
        if (!Page.IsPostBack)
            (sender as RadComboBox).Items.Add(new RadComboBoxItem("Item1"));
            (sender as RadComboBox).Items.Add(new RadComboBoxItem("Item2"));
            (sender as RadComboBox).Items.Add(new RadComboBoxItem("Item3"));

    If I'm visit page first time (not a postbackRadComboBox successfully added Items as at the project in studio as well as in SitefinityHowever, when I do postback to the Web project all Items successfully added to RadComboBox from ViewState, but in Sitefinity RadComboBox stay empty. Why?

    Code of RadBomboBox in Sitefinity and in Visual Studio 2010 Web Application is equal.
    <telerik:RadComboBox ID="RadComboBox1" Runat="server" AutoPostBack="True"
        onload="RadComboBox1_Load" ViewStateMode="Enabled">

  • Problem was solved by setting Administration/Settings/Advanced/Pages/ViewStateMode = enabled
  • Can u pls explain how to do the below to make it work?