Can SetFocus(control)...set a control to the center of the page...

Discussion in 'ASP .Net' started by trint, Sep 13, 2007.

  1. trint

    trint Guest

    I have SetFocus(GridView1) set to the gridview. However, it just goes
    to the left edge of the control instead of making it visible in the
    center of the aspx page.
    Any help is appreciated.
    Thanks,
    Trint
     
    trint, Sep 13, 2007
    #1
    1. Advertising

  2. Hello trint,

    What exactly goes to the left edge? The carriage?

    ---
    WBR,
    Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

    "The greatest danger for most of us is not that our aim is too high and we
    miss it, but that it is too low and we reach it" (c) Michelangelo


    t> I have SetFocus(GridView1) set to the gridview. However, it just
    t> goes
    t> to the left edge of the control instead of making it visible in the
    t> center of the aspx page.
    t> Any help is appreciated.
    t> Thanks,
    t> Trint
     
    Michael Nemtsev, MVP, Sep 14, 2007
    #2
    1. Advertising

  3. trint

    trint Guest

    On Sep 13, 10:33 pm, Michael Nemtsev, MVP <> wrote:
    > Hellotrint,
    >
    > What exactly goes to the left edge? The carriage?
    >
    > ---
    > WBR,
    > Michael Nemtsev [.NET/C# MVP] :: blog:http://spaces.live.com/laflour
    >
    > "The greatest danger for most of us is not that our aim is too high and we
    > miss it, but that it is too low and we reach it" (c) Michelangelo
    >
    > t> I have SetFocus(GridView1) set to the gridview. However, it just
    > t> goes
    > t> to the left edge of the control instead of making it visible in the
    > t> center of the aspx page.
    > t> Any help is appreciated.
    > t> Thanks,
    > t>Trint


    I want to center my FormView1 when it becomes "FormView1.visible =
    true;"
    I have it now going "true", then SetFocus(FormView1); But it just
    brings the page
    over in the browser to the edge of the formview instead of centering
    it in the browser.
    Thanks,
    Trint
     
    trint, Sep 20, 2007
    #3
  4. Hello trint,

    how are u centrize it right now? setting the align="center" ?

    ---
    WBR,
    Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

    "The greatest danger for most of us is not that our aim is too high and we
    miss it, but that it is too low and we reach it" (c) Michelangelo


    t> I want to center my FormView1 when it becomes "FormView1.visible =
    t> true;"
    t> I have it now going "true", then SetFocus(FormView1); But it just
    t> brings the page
    t> over in the browser to the edge of the formview instead of centering
    t> it in the browser.
    t> Thanks,
    t> Trint
     
    Michael Nemtsev, MVP, Sep 22, 2007
    #4
  5. trint

    trint Guest

    On Sep 22, 5:26 am, Michael Nemtsev, MVP <> wrote:
    > Hellotrint,
    >
    > how are u centrize it right now? setting the align="center" ?
    >
    > ---
    > WBR,
    > Michael Nemtsev [.NET/C# MVP] :: blog:http://spaces.live.com/laflour
    >
    > "The greatest danger for most of us is not that our aim is too high and we
    > miss it, but that it is too low and we reach it" (c) Michelangelo
    >
    > t> I want to center my FormView1 when it becomes "FormView1.visible =
    > t> true;"
    > t> I have it now going "true", then SetFocus(FormView1); But it just
    > t> brings the page
    > t> over in the browser to the edge of the formview instead of centering
    > t> it in the browser.
    > t> Thanks,
    > t>Trint


    It is set to align="center", but I don't set the c# function
    "SetFocus(FormView1) until, on the same
    aspx file, after user clicks to view the formview FormView1.Visible =
    true;
    And it ALWAYS sets the focus to the upper left hand corner of the
    FormView1, instead of scrolling
    Horizontally to the center of the FormView1.
    Thanks,
    Trint
     
    trint, Sep 22, 2007
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Haobing
    Replies:
    1
    Views:
    1,069
    Haobing
    Dec 20, 2005
  2. pmclinn
    Replies:
    0
    Views:
    629
    pmclinn
    Mar 4, 2007
  3. kurt sune
    Replies:
    2
    Views:
    3,800
    kurt sune
    Feb 21, 2008
  4. Eric

    Setfocus to control in Iframe

    Eric, Aug 25, 2010, in forum: ASP .Net
    Replies:
    0
    Views:
    811
  5. SetFocus gridview control

    , Oct 4, 2006, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    220
Loading...

Share This Page