Moving Web Controls as runtime

V

vbGansta

Hi Guys,

Sorry for the easy question, but I just started this new framework. How do
I move a control at run-time? I have a DataGrid that binds to a data source
and can have a variable height. There is a label that I need to move based
on how tall the grid is. There isn't a method I can find for doing this.

Thanks for your help.

Joe
 
A

Alvin Bruney [MVP]

Use attributes and java script to move it from the codebehind
[snip]
control1.attributes.add("left","10");
control1.attributes.add("top","20");
 
V

vbGansta

Alvin,

Sorry to bother you again, but I don't know what you mean be moving it from
the code behind and using java script. If you have time can you spell it
out exactly for a newbie? Where the code goes, what it looks like etc? I
have done a number of searches and my head is spinning.

Thanks,
Joe
Alvin Bruney said:
Use attributes and java script to move it from the codebehind
[snip]
control1.attributes.add("left","10");
control1.attributes.add("top","20");

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
vbGansta said:
Hi Guys,

Sorry for the easy question, but I just started this new framework. How do
I move a control at run-time? I have a DataGrid that binds to a data source
and can have a variable height. There is a label that I need to move based
on how tall the grid is. There isn't a method I can find for doing this.

Thanks for your help.

Joe
 
V

vbGansta

Can anyone elaborate on Alvin's answer and spell it out better for me. I.E.
where would the Java script go and what would it look like. All I want to
do is dynamically move a label control!!!!

Joe
vbGansta said:
Alvin,

Sorry to bother you again, but I don't know what you mean be moving it from
the code behind and using java script. If you have time can you spell it
out exactly for a newbie? Where the code goes, what it looks like etc? I
have done a number of searches and my head is spinning.

Thanks,
Joe
Alvin Bruney said:
Use attributes and java script to move it from the codebehind
[snip]
control1.attributes.add("left","10");
control1.attributes.add("top","20");

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
vbGansta said:
Hi Guys,

Sorry for the easy question, but I just started this new framework.
How
do
I move a control at run-time? I have a DataGrid that binds to a data source
and can have a variable height. There is a label that I need to move based
on how tall the grid is. There isn't a method I can find for doing this.

Thanks for your help.

Joe
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top