Grid not maintaining position when a row is clicked

3 posts, 0 answers
  1. Dwayne
    Dwayne avatar
    41 posts
    Member since:
    Jun 2009

    Posted 20 Nov 2010 Link to this post

    I have a page with a grid on it the grid is very  tall the grid could extend 2000px or more, it has one column and 10 rows each row is about 300px . When you clik on a button for each row there is a window that pops up. The window pops up fine but the grid jumps back to the top of the page. So i have to scroll back down to the clicked position to view the contenets of the window. Is this the  normal is there anyway to change that  so when i click the button the window just appears and the grid itself does nothing below is the code uses to call the window
    <a href="#" onclick="getAddWindow(<%# eval("p_id") %>)" class="CheckUsername" title='<%# eval("p_title") %>'>
                       <%#IIf(Not IsDBNull(Eval("p_video")) And Not Eval("p_video") Is Nothing, "<img src='" & Eval("p_video") & "/0.jpg' width='150' border='0' />", "")%>
                       <asp:Panel ID="Panel1" runat="server" Visible='<%# showvisible(eval("p_image")) %>'>
                           <telerik:RadBinaryImage runat="server" ID="RadBinaryImage1" DataValue='<%# convertvarbinary(eval("p_image")) %>'
                               AutoAdjustImageControlSize="false" Height='150px' Width="150px" BorderWidth="0"
                               BorderStyle="none" />

    any help is appreciated thanks.....
  2. Dimo
    Dimo avatar
    8318 posts

    Posted 24 Nov 2010 Link to this post

    Hello Dwayne,

    The problem is not related to RadControls. You need to change

    <a href="#" onclick="getAddWindow(....)">


    <a href="#" onclick="getAddWindow(....);return false;">

    Otherwise the browser tries to navigate to a nonexistent bookmark within the web page (with an empty name) and as a result, jumps to the top of the page. This is an anchor to a bookmark:

    <a href="#mybookmark">text</a>

    the Telerik team
    Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  3. DevCraft R3 2016 release webinar banner
  4. Dwayne
    Dwayne avatar
    41 posts
    Member since:
    Jun 2009

    Posted 24 Nov 2010 Link to this post

    Thank you much this was a bit puzzling but i didn't think about it until you pointed it out
Back to Top