locked
Ajax comboBox RRS feed

  • Question

  • User1774701477 posted

    Hello,

    I'm getting crazy trying to use a simple control as ComboBo that has only and simply to show a list of items.

    First problem: ItemList is shown in a wrong place 

    Second problem: impossible to set width to 100 for combo box.

    After search and search I've found that I have to override css settings (!) , I don't know why, default settings don't work.....

    I've found the following style, and more or less it works. But list item position is still wrong putting top: auto!important;, it is shown over the TextBox for some pixels.:

    How is possible to find a simple solution ?

    Thanks

    <style>
    .WindowsStyle .ajax__combobox_inputcontainer
    {

    }
    .WindowsStyle .ajax__combobox_textboxcontainer
    {
    width:100%;
    }
    .WindowsStyle .ajax__combobox_textboxcontainer input
    {
    width:100%;
    }
    .WindowsStyle .ajax__combobox_buttoncontainer
    {
    }
    .WindowsStyle .ajax__combobox_buttoncontainer button
    {
    background-image: ;
    background-;
    background-repeat: no-repeat;
    border-color: ButtonFace;
    height: 15px;
    width: 15px;
    }
    .WindowsStyle .ajax__combobox_itemlist
    {
    margin: 0px;
    padding: 0px;
    cursor: default;
    list-style-type: none;
    text-align: left;
    border: solid 1px ButtonShadow;
    background-color: Window;
    color: WindowText;
    top: auto!important;
    left: auto!important;
    !important;
    overflow: hidden!important;
    display: block!important;
    }
    .WindowsStyle .ajax__combobox_itemlist li
    {
    white-space: nowrap;
    width: 100%;
    padding: 0 3px 0 2px;
    }
    </style>

    Thursday, September 26, 2013 7:00 AM

All replies

  • User1774701477 posted

    Hi, it's me again-

    Nice, Ive tried the style and it doesn't works properly with Firefox: in fact width:100% is competely ignored for textbox and also for listitem,

    With Chrome, width:100% works only for text box but not for listitem.

    Please, is there any solution fot this simple problem?

    Thursday, September 26, 2013 8:58 AM
  • User-227760790 posted

     

    you can try the demo below:

    Ajax ComboBox - How to add ListItem programmatically in asp.net ComboBox

    http://asp-net-example.blogspot.in/2011/02/ajax-combobox-how-to-add-listitem.html

    if not working , you provide your complete project to SkyDrive in order to help us to understand your issue better..

    Friday, September 27, 2013 2:36 AM