Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Positioning a button

Status
Not open for further replies.

groston

IS-IT--Management
Dec 31, 2001
141
US
On a web form, I have a datagrid and the necessary controls to add items to the underlying table. What I would like to do is have a 'Done' button positioned just beneath the table, that when pushed, commits the changes to the database.

Now, this may seem silly, but the part I cannot figure out is how to reposition the button!

Here's what I am trying

<do data stuff>
dg.DataSource = myDataTable
dg.DataBind

cmdDone.Style(&quot;TOP&quot;) = (Val(dg.Style(&quot;TOP&quot;)) + CInt(dg.Height.Value) + 10).ToString + &quot;px&quot;

But the button never moves :-(

What am I missing?

Thanks.

----

Gerry Roston
gerry@pairofdocs.net
 
One other note: Using the debugger, the part that seems to be non-functional is the dg.Height.Value - this always returns 0.

----

Gerry Roston
gerry@pairofdocs.net
 
The easiest way to do this might be to use a two row, one column table. Put the datagrid in the first row's cell, and the button in the second rows cell. That way, no matter how big the datagrid grows, the second row (and hte button) will always be below it.

hth

D'Arcy
 
jfrost10,

Took a minute to get this working properly, but your suggestion provided the exact answer for which I was looking. Thanks!


----

Gerry Roston
gerry@pairofdocs.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top