Random positioning of RadAutoCompleteBox !

11 posts, 0 answers
  1. Mohsen
    Mohsen avatar
    6 posts
    Member since:
    Feb 2013

    Posted 17 Feb 2013 Link to this post

    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>
  2. Mohsen
    Mohsen avatar
    6 posts
    Member since:
    Feb 2013

    Posted 18 Feb 2013 Link to this post

    So does anyone care about this !?
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. LeBear
    LeBear avatar
    233 posts
    Member since:
    May 2006

    Posted 07 Mar 2013 Link to this post

    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.
  5. LeBear
    LeBear avatar
    233 posts
    Member since:
    May 2006

    Posted 08 Mar 2013 Link to this post

    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!
  6. Mohsen
    Mohsen avatar
    6 posts
    Member since:
    Feb 2013

    Posted 08 Mar 2013 Link to this post

    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.
  7. Mohsen
    Mohsen avatar
    6 posts
    Member since:
    Feb 2013

    Posted 08 Mar 2013 Link to this post

    I have tried you solution in a separate project and that did not fix the problem !!!
  8. LeBear
    LeBear avatar
    233 posts
    Member since:
    May 2006

    Posted 11 Mar 2013 Link to this post

    I'm sorry that didn't work for you.  :(

    I know it's a CSS issue.  For me, this worked in multiple places.
  9. Bozhidar
    Admin
    Bozhidar avatar
    1101 posts

    Posted 12 Mar 2013 Link to this post

    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.
  10. Mohsen
    Mohsen avatar
    6 posts
    Member since:
    Feb 2013

    Posted 12 Mar 2013 Link to this post

    I have done what he suggested with no success.
    If you are going to fix this issue I can share my project ?
  11. Bozhidar
    Admin
    Bozhidar avatar
    1101 posts

    Posted 13 Mar 2013 Link to this post

    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.
  12. Mohsen
    Mohsen avatar
    6 posts
    Member since:
    Feb 2013

    Posted 13 Mar 2013 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017