+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / After postback RadCombobox items not load

After postback RadCombobox items not load

3 posts, 0 answered
  1. Rostislav
    Rostislav avatar
    3 posts
    Registered:
    13 Feb 2009
    07 Aug 2011
    Link to this post
    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">
    </telerik:RadComboBox>

  2. Rostislav
    Rostislav avatar
    3 posts
    Registered:
    13 Feb 2009
    08 Aug 2011
    Link to this post
    Problem was solved by setting Administration/Settings/Advanced/Pages/ViewStateMode = enabled
  3. jawahar
    jawahar avatar
    1 posts
    Registered:
    29 Aug 2012
    13 Sep 2012
    Link to this post
    Can u pls explain how to do the below to make it work?


    Thanks,
    Jawahar.
3 posts, 0 answered