Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Window > Radwindow Position
RadControls for ASP.NET are no longer supported (see this page for reference). In case you have inquiries about the Telerik ASP.NET AJAX controls, post them in the pertinent ASP.NET AJAX forums.

Answered Radwindow Position

Feed from this thread
  • Santosh avatar

    Posted on May 24, 2011 (permalink)

    Hello Team,

    I have one page. the length of page is very long. On that click on edit link it opens one rad window.
    If i click on edit link the background page on which edit link is there scrolls Up. Rad window moves down and page scrolls up.
    Please help me.

    Thanks,
    Santosh.

  • Georgi Tunev Georgi Tunev admin's avatar

    Posted on May 24, 2011 (permalink)

    Hello Santosh ,

    I assume that your link looks something like this:
    <a href="#" onclick="openWindow()">link text</a>

    If this is so, when you set href="#", browsers treats this link as an anchor - i.e., it looks for a corresponding anchor on the same page so it can scroll to it. Because such anchor does not exist, the browser scrolls the page to the top.
    To avoid that problem, use the following syntax:
    <a href="javascript:void(0);" onclick="openWindow(); return false;">link text</a>


    Greetings,
    Georgi Tunev
    the Telerik team

    Consider using RadControls for ASP.NET AJAX (built on top of the ASP.NET AJAX framework) as a replacement for the Telerik ASP.NET Classic controls, See the product support lifecycle here.

  • Santosh avatar

    Posted on May 24, 2011 (permalink)

    //On OnItemDataBound event
    if
    (ibtnEdit != null)
      {
       ibtnEdit.Attributes.Add("onclick", "return EditAccessCodeLetter('" + AccessCodeLetterID + "' );");
      }

    //Javascript

    function
    EditAccessCodeLetter(AccessCodeLetterId) {
     
    var test = radopen("../CustomerPortal/AddUpdateAccessCodeLetter.aspx?AccessCodeLetterID=" + AccessCodeLetterId, "EditAccessCodeLetter2");
    test.Center();
    return false;
                }

    Hello Team,

    I have not used anchor tag. I have called java script at run time on Item data_bound event. I have attached attributes to button at runtime to call javascript. I have paste the code above. Please go through it.

    Thanks,
    Santosh

  • Answer Shinu MVP avatar

    Posted on May 24, 2011 (permalink)

    Hello Santhosh,

    I suggest you to use the MoveTo to position the RadWindow to the position.
    Javascript:
    function openWindow()
     {
        var wnd = radopen(null, "Window1");
        wnd.MoveTo(20, 20);//Moving the RadWindow to the cocordinate postion 20,20.
        return false;
    }

    Thanks,
    Shinu.

  • Santosh avatar

    Posted on May 25, 2011 (permalink)

    Hello Shinu,

    Thanks for your great help.

    Thanks,
    Santosh.

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Window > Radwindow Position