cannot change table cell width with dynamic controls

sauppodarpeva

New Member
I am creating a dynamic table in code-behind. The first row, in the first cell has a dynamic radiobuttonlist, and in second cell, a textbox as below:
YrtTt.png
The second row just uses a colspan=2.I'd added a border on each of the cells.I just can't (for the life of me!) figure out how to change the width on the first cell so that the textbox column is closer to the radiobuttonlist.The whole table has the CSS:\[code\] .table{ border-style:solid; border-width:1px; -moz-border-radius: 6px; -webkit-border-radius: 6px; border-radius: 10px; border: 1px solid black; border-color:Gray; width:900px;}\[/code\]And no matter how I try changing the td width (e.g. codebehind td.Width = 200), it just won't work. In fact, it acts funny as it behaves in the following way.[*]If I change the radiobuttonlist width, (e.g. radiobuttonlist.width = 180) I get the following with the radiobutton text overflow to another line:
MWGtb.png
[*]If I try to change the 1st td width to smaller, (e.g. td.Width = 100), I get this reverse effect (with td width getting bigger):
MiKR5.png
[*]If I try to change the 2nd td width (with any value actually - I get same result using td1.Width =40 or td1.Width = 400), I get something like this:
lgzdB.png
I am using VS2012 Express and not sure if I should note that on my page, I am actually creating multiple tables like the example given (all done dynamically).Any ideas? Would really appreciate any advice or tips!
 
Back
Top