After postback RadCombobox items not load

Posted by Community Admin on 04-Aug-2018 19:42

After postback RadCombobox items not load

All Replies

Posted by Community Admin on 07-Aug-2011 00:00

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>

Posted by Community Admin on 08-Aug-2011 00:00

Problem was solved by setting Administration/Settings/Advanced/Pages/ViewStateMode = enabled

Posted by Community Admin on 13-Sep-2012 00:00

Can u pls explain how to do the below to make it work?


Thanks,
Jawahar.

This thread is closed