DropDownHeight property not working!

4 posts, 0 answers
  1. mqsash
    mqsash avatar
    31 posts
    Member since:
    May 2012

    Posted 04 Jan 2013 Link to this post


    For some reason, IE will not display my autocomplete with the DropDownHeight that I specify for my RadAutocompleteBox.
    The DropDownWidth works just fine but the height does not at all.

    I have set the Dropdownheight to "100" and I expect that when I type in something that results in a lot of suggestion items, The suggestions list will be 100px tall with a scrollbar in the control itself. But what is happening is that the suggestions list is just one tall list with no scrollbar and instead the scrollbar appears for the entire browser's client area

    In the code behind, if I read the value of the  DropDownHeight property of the control it returns 100px which is what I expect, but for some reason the rendering is not honoring that value :(

    I have checked that I have no css overriding any of the a RadAutoCompleteBox properties so I am not sure where to go next. 
    FYI: here is the code snippet for my autocomplete box which is basically a straight copy from one of the demo pages on telerik.

    <telerik:RadAutoCompleteBox ID="RadAutoCompleteBox3"

    Any pointers or suggestions on how to get to the bottom of this and fix it will be highly appreciated

  2. mqsash
    mqsash avatar
    31 posts
    Member since:
    May 2012

    Posted 04 Jan 2013 Link to this post

    Found the cause.... an incorrect <!DocType > declaration!
    The aspx page had a doctype of HTML 4.0, but the DropDownHeight gets applied only if the doctype is XHTML 1.0!!

    The issue is now resolved. All I had to do was make this one change to my aspx page :
    Before:   <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

    Now :      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">

    Can someone from telerik confirm that this is required? Is this documented somewhere?


  3. Ivan Zhekov
    Ivan Zhekov avatar
    604 posts

    Posted 07 Jan 2013 Link to this post


    The doctype consists of two parts: the doctype itself and a system identifier (a URL).

    Depending on how exactly the doctype was declared, browsers may act differently:
    -- When specifying HTML 4.01 Transitional without a system identifier, Quirks mode is triggered in IE
    -- When specifying XHTML 1.0 Transitional without a system identifier, Almost standards mode is triggered in IE

    The difference between Quirks, Standards and Almost standards is quite visible in IE, hence the differences.

    If you would like to use HTML 4 doctype, use the full doctype e.g:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

    Though I would suggest using XHTML 1.0 with the full doctype:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    (That last part at the end, the URL in quotes is the system identifier.)

    Ivan Zhekov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  4. mqsash
    mqsash avatar
    31 posts
    Member since:
    May 2012

    Posted 07 Jan 2013 Link to this post

    Thanks for confirming this Ivan, we will use your suggested approach of XHTML1.0 with full doctype :)

Back to Top