0

I'm having UI problems with ajaxtoolkit's combo box inside gridview.

 <asp:Gridview Id="grv" runat="server" AutoGenerateColumns="False" CellPadding="4">
  <Columns>
    <asp:TempalteField>
        <ItemTemplate>
              <cc1:ComboBox ID="cmbGrdOrigin" runat="server"  AutoCompleteMode="Suggest" Visible="false" DropDownStyle="DropDown"
                            AutoPostBack="true">
                            <asp:ListItem Text="" Value="" />
                            <asp:ListItem Text="Domestic" Value="Domestic" />
                            <asp:ListItem Text="Foreign" Value="Foreign" />
              </cc1:ComboBox>
        </ItemTemplate>
    <asp:TempalteField>
  </Columns>
 </asp:Gridview>    

The problem is the list of items are not showing. The combobox item list does not overlap with the cell below it.

Added photo for reference. all the combobox on the grid does not work https://drive.google.com/open?id=0B4JBZR0AZcx9WjNkbjM5UkZ1Y2c

Alvie
  • 29
  • 6
  • would `Visible="false"` be related to why the combobox is not showing, do you think? Also I'm pretty sure `asp:TempalteField` should be `asp:TemplateField` (and same when you close it) – ADyson Dec 14 '16 at 13:39
  • the visible ="false" changes after i pressed the button. the combox is showing properly the problem is the choice are not showing up. – Alvie Dec 15 '16 at 00:49
  • Have you using `ScriptManager`? I found no other errors besides ``, which should be `...` – Tetsuya Yamamoto Dec 15 '16 at 02:21
  • Yup i have ScriptManager.. and already fixed the . – Alvie Dec 15 '16 at 02:28
  • just checking, you have not bound this to a datasource in the code-behind have you? According to the docs (https://ajaxcontroltoolkit.devexpress.com/ComboBox/ComboBox.aspx) "When bound to a data source, all declared ListItems will be removed unless the AppendDataBoundItems property is set to "true". – ADyson Dec 15 '16 at 09:35
  • No, I have not bind any datasource on the code behind. The listitems are constant and never changes. – Alvie Dec 16 '16 at 09:58
  • have you checked there are no CSS styles causing it to be hidden? You might be able to see in the Dev tools - check that the box is rendered or not in the source, and then see if something is hiding it (by looking at computed styles for the element). Google Chrome has the easiest tools for this IMHO – ADyson Dec 16 '16 at 11:45
  • @ADyson Thanks, found the problem – Alvie Jan 04 '17 at 04:22

0 Answers0