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

DropDownHeight property not working!

3 Answers 84 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
mqsash
Top achievements
Rank 1
mqsash asked on 04 Jan 2013, 08:33 PM
Hi,

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"
                runat="server"
                Width="400"
                DropDownWidth="100"
                DropDownHeight="100"
                DataSourceID="SqlDataSource1"
                DataTextField="State_Name">
            </telerik:RadAutoCompleteBox>

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

Thanks

3 Answers, 1 is accepted

Sort by
0
mqsash
Top achievements
Rank 1
answered on 04 Jan 2013, 10:14 PM
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?

Samir


0
Ivan Zhekov
Telerik team
answered on 07 Jan 2013, 11:51 AM
Hello,

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.)

Greetings,
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.
0
mqsash
Top achievements
Rank 1
answered on 07 Jan 2013, 07:49 PM
Thanks for confirming this Ivan, we will use your suggested approach of XHTML1.0 with full doctype :)

Tags
AutoCompleteBox
Asked by
mqsash
Top achievements
Rank 1
Answers by
mqsash
Top achievements
Rank 1
Ivan Zhekov
Telerik team
Share this question
or