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

T

trint

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
 
M

Michael Nemtsev, MVP

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
 
T

trint

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
 
M

Michael Nemtsev, MVP

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
 
T

trint

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top