This is a migrated thread and some comments may be shown as answers.
Random positioning of RadAutoCompleteBox !
10 Answers 55 Views
This is a migrated thread and some comments may be shown as answers.
Mohsen
Top achievements
Rank 1
Mohsen asked on 17 Feb 2013, 11:54 AM
I'm using the following code to center all my elements on page which cause RadAutoCompletePopup to appear wherever other than location it must be !

EDIT : RadAutoCompleteBox position is fine but not the popup assigned to it.

Two first div center all my elements on page.
<br>
<body><br>
    <div style="float: left; position: relative; left: 50%; display: block;"><br>
        <div style="float: left; position: relative; left: -50%; display: block;"><br>
<br>
            <form id="form1" runat="server"><br>
//telerik metadata here         <br>
<br>
<br>
                <div style="width: 500px;"><br>
                    <asp:SqlDataSource runat="server" ID="SqlDataSource1" ConnectionString='<%$ ConnectionStrings:ttssConnectionString %>' SelectCommand="SELECT [rang], [data] FROM [Table_1]"></asp:SqlDataSource><br>
                    <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1"><br>
                        <ItemTemplate><br>
                            <div  ></div><br>
                            <telerik:RadAutoCompleteBox ID="RadAutoCompleteBox1" runat="server" DataTextField="rang" DataSourceID="SqlDataSource1" AllowCustomEntry="True" InputType="Text"></telerik:RadAutoCompleteBox><br>
                            </div><br>
                        </ItemTemplate><br>
                    </asp:Repeater><br>
                </div><br>
<br>
            </form><br>
<br>
        </div><br>
    </div><br>
</body>

10 Answers, 1 is accepted

Sort by
0
Mohsen
Top achievements
Rank 1
answered on 18 Feb 2013, 03:42 PM
So does anyone care about this !?
0
LeBear
Top achievements
Rank 1
answered on 07 Mar 2013, 09:30 PM
Actually, I do.  I've run into this before.  I believe it's related to CSS, as I've seen this before with other controls.  If no one responds, I'll let you know what I find.
0
LeBear
Top achievements
Rank 1
answered on 08 Mar 2013, 03:20 PM
Mohsen,

I hope this helps you out.  It took me FOREVER to track down a solution for my situation, and from your code, you may be experiencing the same thing.

I, too, had DIV tags surrounding the form element.  (In my case, it was only one.)  I moved the DIVs inside of the form, and everything worked just fine.

Let me know if this works for you.

Best of luck!
0
Mohsen
Top achievements
Rank 1
answered on 08 Mar 2013, 03:31 PM
Thanks LeBear,
Already I have no access to the project right now.
Due to time limit I had before, changed RadAutoCompleteBox to RadTextBox !
However I will tell you if your solution works fine or not whenever can access the project.
0
Mohsen
Top achievements
Rank 1
answered on 08 Mar 2013, 07:57 PM
I have tried you solution in a separate project and that did not fix the problem !!!
0
LeBear
Top achievements
Rank 1
answered on 11 Mar 2013, 05:11 PM
I'm sorry that didn't work for you.  :(

I know it's a CSS issue.  For me, this worked in multiple places.
0
Bozhidar
Telerik team
answered on 12 Mar 2013, 08:13 AM
Hi,

As Barry pointed out, the problem is the divs surrounding the form element. The AutoCompleteBoxs dropdown element is a direct child of the form element and uses position absolute. That's why when you put the form in a relative positioned container the position is incorrect. 

I've modified your code so that the two outer divs are inside the form element, and everything was working correctly. I've attached the modified page for reference.
 

Kind regards,
Bozhidar
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
Mohsen
Top achievements
Rank 1
answered on 12 Mar 2013, 08:31 PM
I have done what he suggested with no success.
If you are going to fix this issue I can share my project ?
0
Bozhidar
Telerik team
answered on 13 Mar 2013, 07:51 AM
Hello Mohsen,

Can you confirm that the page I sent you still displays incorrectly, or does the issue persists only in your real project?
 

All the best,
Bozhidar
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
Mohsen
Top achievements
Rank 1
answered on 13 Mar 2013, 06:05 PM
I have downloaded and tested your attached file and that works fine. However the solution is not a general solution. At least for my project.
Asked by
Mohsen
Top achievements
Rank 1
Answers by
Mohsen
Top achievements
Rank 1
LeBear
Top achievements
Rank 1
Bozhidar
Telerik team
Share this question
or