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

RadComboBox in RadWindow is not dropping the items to select

0 Answers 48 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Srinivas Chitta
Top achievements
Rank 1
Srinivas Chitta asked on 14 Aug 2010, 03:12 PM
Hi,

I have a radcombobox in a rad window page. The items in the radcombobox are initialized using  DataSource. The items are binded to the RadComboBox. But i am unable to see the items in the radcombobox. it is looking as through it is disabled.

What may be the problem..I am struck here in my program. Please help me.

Source Code for Form
=====================================================================================

<telerik:RadFormDecorator ID="frmDecorator" runat="Server" DecoratedControls="All"
    DecorationZoneID="zone1" />

<div id="zone1">
    <center>
        <br />
        <br />
        <table id="Table3" runat="server" align="center" border="0" cellspacing="0" dir="ltr"
            rules="none" width="90%">
            <tr>
                <td align="left">
                    <asp:Label ID="Label1" Text="Add Catalog" Font-Names="Segoe UI" ForeColor="DarkBlue"
                        Font-Size="Large" runat="server"></asp:Label>
                    <br />
                    <br />
                    <asp:LinkButton Font-Names="Segoe UI" Font-Bold="false" ForeColor="#678BC9" Font-Size="Small"
                        CausesValidation="false" runat="server" ID="lnkHelp" Text="Help"></asp:LinkButton>
                    |
                    <asp:LinkButton Font-Names="Segoe UI" Font-Bold="false" ForeColor="#678BC9" Font-Size="Small"
                        CausesValidation="false" ID="hlnkViewCatalog" runat="server" Text="View Catalog"></asp:LinkButton>
                </td>
                <td align="right">
                    <asp:Image ID="Image1" runat="server" AlternateText="Image" ImageUrl="~/Images/Catalog.jpg" />
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <hr style="width: 100%; color: Gray" />
                </td>
            </tr>
            <tr height="15">
            </tr>
        </table>
        <table width="90%">
            <tr>
                <td colspan="8" align="left">
                    <asp:Label ID="lblMsg" runat="server" CssClass="noteMsg" Font-Bold="true"></asp:Label>
                </td>
            </tr>
        </table>
        <table id="Table1" runat="server" align="center" border="1" bordercolor="#ccddef"
            dir="ltr" height="1%" rules="none" width="90%"
            style="margin: 0; padding: 0">
            <tr>
                <td bgcolor="white">
                    <table id="Table2" width="100%" runat="server" border="0" cellpadding="2" cellspacing="2"
                        dir="ltr">
                        <tr>
                            <td width="24%">
                                <asp:Label ID="lblCatalogCode" Text="Catalog Code" runat="server" />
                            </td>
                            <td width="1%">
                                <font color='red'>*</font>
                            </td>
                            <td width="25%">
                                <telerik:RadTextBox ID="txtCatalogCode" runat="server" Width="155px" />
                            </td>
                            <td width="24%">
                                <asp:Label ID="lblCatalogName" Text="Catalog Name" runat="server" />
                            </td>
                            <td width="1%">
                                <font color='red'>*</font>
                            </td>
                            <td>
                                <telerik:RadTextBox ID="txtCatalogName" runat="server" Width="155px" />
                            </td>
                            <td rowspan="4" valign="top">
                                <asp:Image ID="imgPreview" runat="server" AlternateText="Image" />
                                <br />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="lblCategory" Text="Categoy" runat="server" />
                            </td>
                            <td width="1%">
                                <font color='red'>*</font>
                            </td>
                            <td>
                                <telerik:RadComboBox ID="ddlCategoryNames" runat="server" Width="155px">
                                </telerik:RadComboBox>
                            </td>
                            <td rowspan="2" valign="top">
                                <asp:Label ID="lblUploadImage" Text="Image" runat="server" />
                            </td>
                            <td>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="lblBarcode" Text="Barcode" runat="server" />
                            </td>
                            <td>
                            </td>
                            <td>
                                <telerik:RadTextBox ID="txtBarcode" runat="server" Width="155px" />
                            </td>
                        </tr>
                        <tr height="15">
                        </tr>
                        <tr>
                            <td width="90%" align="left" colspan="9">
                                <asp:Label runat="server" Text="UOM" Font-Names="Segoe UI" Font-Size="Small"></asp:Label>
                                <br />
                                <hr style="width: 90%">
                                <br />
                                <table id="Table4" width="40%" runat="server" border="0" cellpadding="2" cellspacing="2"
                                    dir="ltr" align="left">
                                    <tr>
                                        <td>
                                            Store
                                        </td>
                                        <td>
                                            Buy
                                        </td>
                                        <td>
                                            Sell
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <telerik:RadComboBox runat="server" ID="ddlStore">
                                            </telerik:RadComboBox>
                                        </td>
                                        <td>
                                            <telerik:RadComboBox runat="server" ID="ddlBuy">
                                            </telerik:RadComboBox>
                                        </td>
                                        <td>
                                            <telerik:RadComboBox runat="server" ID="ddlSell">
                                            </telerik:RadComboBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <telerik:RadTextBox runat="server" ReadOnly="true" Text="1" ID="txtStore" MaxLength="2"
                                                Width="40px" />
                                            <asp:Label runat="server" ID="lblStore"></asp:Label>
                                        </td>
                                        <td>
                                            <telerik:RadTextBox runat="server" ID="txtBuy" MaxLength="5" Width="40px" />
                                            <asp:Label runat="server" ID="Label2"></asp:Label>
                                        </td>
                                        <td>
                                            <telerik:RadTextBox runat="server" ID="txtSell" MaxLength="5" Width="40px" />
                                            <asp:Label runat="server" ID="Label3"></asp:Label>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr height="15">
                        </tr>
                        <tr>
                            <td align="center" bgcolor="#ccddef" colspan="8">
                                <asp:Button ID='btnSave' Width="95px" Text=Save" runat="server" />&nbsp;&nbsp;
                                <asp:Button ID="btnCancel" Width="95px" Text="Cancel" runat="server"
                                    CausesValidation="false" />&nbsp;&nbsp;
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </center>
</div>

=====================================================================================

Code Behind
======================================================================================
    Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
        dim lst as Global.System.Collections.Generic.IList(Of String) = new List(Of String)
        lst.Add("Category1"): lst.Add("Category2")
            ddlCategoryNames.DataSource = List
        ddlCategoryNames.DataBind()
    
        Dim codes As Global.System.Collections.Generic.IList(Of String)= new List(Of String)
        codes.Add("A") : codes.Add("B") : codes.Add("C")
            ddlStore.Items.Clear() : ddlStore.DataSource = codes : ddlStore.DataBind()
            ddlBuy.Items.Clear() : ddlBuy.DataSource = codes : ddlBuy.DataBind()
        ddlSell.Items.Clear() : ddlSell.DataSource = codes : ddlSell.DataBind()
    End If
=========================================================================================

No answers yet. Maybe you can help?

Tags
ComboBox
Asked by
Srinivas Chitta
Top achievements
Rank 1
Share this question
or