This is a migrated thread and some comments may be shown as answers.

ComboBox Not Loading Controls

1 Answer 80 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
PPI Itdept
Top achievements
Rank 1
PPI Itdept asked on 15 Jul 2008, 08:24 PM

I had this working in the trial version Q3 2007 and now updating to Q1 2008. I have a RadComboBox and when a user selects a different index I want a group of controls to update. I have these controls within a UpdatePanel. Here is some code:

Here is the RadComboBox code

<table cellpadding="5" cellspacing="5" style="border-right: #bfdbff thin solid; font-size: 8.5pt; border-left: #bfdbff thin solid; width: 95%; border-top: #bfdbff thin solid;  
            font-family: Verdana, Arial"> 
            <tr> 
                <td style="width: 151px; text-align: right; color: #15428b; font-weight: bold;">  
                    System :  
                </td> 
                <td style="width: 150px; text-align: left">  
                    <rad:RadComboBox ID="rcbSystem" runat="server" AutoPostBack="true" Skin="Office2007" Width="105px" OnSelectedIndexChanged="rcbSystem_SelectedIndexChanged" > 
                        <CollapseAnimation Duration="200" Type="OutQuint" /> 
                    </rad:RadComboBox> 
                      
                </td> 
                <td style="width: 100px; text-align: right; color: #15428b; font-weight: bold;">  
                &nbsp;</td> 
                <td style="width: 242px; text-align: left">  
                &nbsp;</td> 
                <td> 
                </td> 
            </tr> 
        </table> 

Here are the controls that I wnat to update

<asp:UpdatePanel ID="UpdatePanel1" runat="server">  
            <ContentTemplate> 
                <table cellpadding="5" cellspacing="5" style="border-right: #bfdbff thin solid; font-size: 8.5pt; border-left: #bfdbff thin solid; width: 95%; border-bottom: #bfdbff thin solid;  
                    font-family: Verdana, Arial"> 
                    <tr> 
                        <td style="width: 151px; text-align: right; color: #15428b; font-weight: bold;">  
                            Product ID :  
                        </td> 
                        <td style="width: 150px; text-align: left">  
                            <asp:Label ID="lblProductID" runat="server" /> 
                        </td> 
                        <td style="width: 100px; text-align: right; color: #15428b; font-weight: bold;">  
                            &nbsp;</td> 
                        <td style="width: 242px; text-align: left">  
                            &nbsp;</td> 
                        <td> 
                            <asp:ImageButton ID="imgEditProduct" runat="server" AlternateText="Edit Product" ImageUrl="~/RadControls/Grid/Skins/Edit.gif" />   
                            <asp:Label ID="Label1" runat="server" Text="Edit Product" /> 
                            <asp:Button ID="Button1" runat="server" BackColor="white" BorderStyle="None" Visible="true" OnClick="Button1_Click" /> 
                        </td> 
                    </tr> 
                    <tr> 
                        <td style="width: 151px; text-align: right; color: #15428b; font-weight: bold;">  
                            Product Name :  
                        </td> 
                        <td colspan="4" style="text-align: left">  
                            <asp:Label ID="lblProductName" runat="server" ForeColor="Red">No Information Available</asp:Label></td>  
                    </tr> 
                    <tr> 
                        <td style="width: 151px; text-align: right; color: #15428b; font-weight: bold;">  
                            Product Notes :  
                        </td> 
                        <td colspan="4" style="text-align: left">  
                            <asp:Label ID="lblNotes" runat="server"></asp:Label></td>  
                    </tr> 
                    <tr> 
                        <td style="width: 151px; text-align: right; color: #15428b; font-weight: bold;">  
                            Prescription Required :  
                        </td> 
                        <td style="width: 150px; text-align: left">  
                            <asp:Label ID="lblPrescription" runat="server"></asp:Label></td>  
                        <td style="width: 100px">  
                        </td> 
                        <td style="width: 242px">  
                        </td> 
                        <td> 
                        </td> 
                    </tr> 
                    <tr> 
                        <td style="font-weight: bold; width: 151px; color: #15428b; text-align: right">  
                            Show In System :  
                        </td> 
                        <td style="width: 150px; text-align: left">  
                            <asp:Label ID="lblShowInSystem" runat="server"></asp:Label></td>  
                        <td style="width: 100px">  
                        </td> 
                        <td style="width: 242px">  
                        </td> 
                        <td> 
                        </td> 
                    </tr> 
                    <tr> 
                        <td style="width: 151px; text-align: right; color: #15428b; font-weight: bold;">  
                            Deleted :  
                        </td> 
                        <td style="width: 150px; text-align: left">  
                            <asp:Label ID="lblDeleted" runat="server"></asp:Label></td>  
                        <td style="width: 100px">  
                        </td> 
                        <td style="width: 242px">  
                            <asp:Label ID="lblSysID" runat="server" ForeColor="White"></asp:Label></td>  
                        <td> 
                        </td> 
                    </tr> 
                    <tr> 
                        <td style="width: 151px; text-align: right; color: #15428b; font-weight: bold;">  
                            Created On :  
                        </td> 
                        <td style="width: 150px; text-align: left">  
                            <asp:Label ID="lblCreatedOn" runat="server" /> 
                        </td> 
                        <td style="width: 100px; color: #15428b; font-weight: bold; text-align: right;">  
                            Modified On :  
                        </td> 
                        <td style="width: 242px; text-align: left">  
                            <asp:Label ID="lblModifiedOn" runat="server"></asp:Label></td>  
                        <td> 
                        </td> 
                    </tr> 
                    <tr> 
                        <td style="width: 151px; text-align: right; color: #15428b; font-weight: bold;">  
                            Created By :  
                        </td> 
                        <td style="width: 150px; text-align: left">  
                            <asp:Label ID="lblCreatedBy" runat="server" /> 
                        </td> 
                        <td style="width: 100px; color: #15428b; font-weight: bold; text-align: right;">  
                            Modified By :  
                        </td> 
                        <td style="width: 242px; text-align: left">  
                            <asp:Label ID="lblModifiedBy" runat="server" /> 
                        </td> 
                        <td> 
                        </td> 
                    </tr> 
                </table> 
            </ContentTemplate> 
        </asp:UpdatePanel> 

Here is the code behind

        protected void rcbSystem_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)  
        {  
            systemID = rcbSystem.SelectedValue;  
            lblSysID.Text = systemID;  
 
            lblProductName.Text = "No Information Available";  
            lblNotes.Text = "No Information Available";  
            lblPrescription.Text = "No Information Available";  
            lblShowInSystem.Text = "No Information Avaialble";  
            lblDeleted.Text = "No Information Available";  
            lblCreatedOn.Text = "No Information Available";  
            lblCreatedBy.Text = "No Information Available";  
            lblModifiedOn.Text = "No Information Available";  
            lblModifiedBy.Text = "No Information Available";  
 
            lblProductName.Attributes.CssStyle.Add("color", "red");  
            lblNotes.Attributes.CssStyle.Add("color", "red");  
            lblPrescription.Attributes.CssStyle.Add("color", "red");  
            lblShowInSystem.Attributes.CssStyle.Add("color", "red");  
            lblDeleted.Attributes.CssStyle.Add("color", "red");  
            lblCreatedOn.Attributes.CssStyle.Add("color", "red");  
            lblCreatedBy.Attributes.CssStyle.Add("color", "red");  
            lblModifiedOn.Attributes.CssStyle.Add("color", "red");  
            lblModifiedBy.Attributes.CssStyle.Add("color", "red");  
 
            //imgEditProduct.Visible = false;  
            imgEditSummary.Visible = false;  
            rgCategory.Visible = false;  
            imgEditDesc.Visible = false;  
            imgEditFeature.Visible = false;  
            rgIndication.Visible = false;  
            rgMedicalInjury.Visible = false;  
            imgEditSEODesc.Visible = false;  
            rgSEOKeyword.Visible = false;  
            rgBodyPart.Visible = false;  
 
            lblEditSummary.Text = "";  
            lblEditDesc.Text = "";  
            lblEditFeature.Text = "";  
            lblEditSEODesc.Text = "";  
            Label1.Text = "";  
 
            Top_Load();  
            Category_Load();  
            Summary_Load();  
            Feature_Load();  
            PDFApplication_Load();  
            Images_Load();  
            Description_Load();  
            MedicalInjury_Load();  
            Indication_Load();  
            SEODescription_Load();  
            SEOKeyword_Load();  
            Related_Load();  
            BodyPart_Load();  
            HTMLApplication_Load();  
        } 

Thanks

1 Answer, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 18 Jul 2008, 12:32 PM
Hello PPI Itdept,

I tried to reproduce the problem, but to no avail.

I created a combobox, added an update panel and put a label in the update panel. I tried putting the combo inside and outside the update panel.

In the SelectedIndexChanged event handler of the combobox I set the text of the label to be the text of the selected item and it is working fine.

Can you isolate the problem in a small and running project and send it to us please?

Regards,
Veskoni
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
ComboBox
Asked by
PPI Itdept
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Share this question
or