Gezna
asked on
Placeholder new line
I'm using a placeholder to hold rows of controls (textboxes and dropdownlists) and I'm looking for a way to add them so that I get eleven columns in each row.
My problem is now that if the controls don't take up the entire width of the page, then a control that I intended to go on the row below ends up on the row above.
To resolve the problem I am currently adding an invisible label to take up the rest of the space in the row, but is there some way to push the control down to the next line?
Thanks
My problem is now that if the controls don't take up the entire width of the page, then a control that I intended to go on the row below ends up on the row above.
To resolve the problem I am currently adding an invisible label to take up the rest of the space in the row, but is there some way to push the control down to the next line?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Or place all controls inside a table. Then you can use <TR></TR> to define your rows.
Hope this works for u,
For intCounter = 0 To l_dtDtattable.Rows.Count - 1 'ViewState("ProductFieldCo unt")
Dim ll As Integer
ll = intCounter
Dim litLabel As System.Web.UI.LiteralContr ol
Dim txtTextBox As System.Web.UI.WebControls. TextBox
Dim radRadiolist As System.Web.UI.WebControls. RadioButto nList
'add textbox control
txtTextBox = New System.Web.UI.WebControls. TextBox()
txtTextBox.ID = Trim(l_dtDtattable.Rows(ll ).Item("QI D"))
txtTextBox.Text = Trim(l_dtDtattable.Rows(ll ).Item("QI D"))
txtTextBox.Width = System.Web.UI.WebControls. Unit.Pixel (40)
'txt_qid1.Width = System.Web.UI.WebControls. Unit.Pixel (60)
Me.PlaceHolder1.Controls.A dd(txtText Box)
'add literal Controls
litLabel = New System.Web.UI.LiteralContr ol()
litLabel.Text = "<b> " & l_dtDtattable.Rows(ll).Ite m("Questio nn") & ":</b>"
Me.PlaceHolder1.Controls.A dd(litLabe l)
'add Radiolist controls
radRadiolist = New System.Web.UI.WebControls. RadioButto nList()
radRadiolist.ID = "rad" & Trim(l_dtDtattable.Rows(ll ).Item("QI D"))
radRadiolist.Items.Add(l_d tDtattable .Rows(ll). Item("Choi ce_1"))
radRadiolist.Items.Add(l_d tDtattable .Rows(ll). Item("Choi ce_2"))
radRadiolist.Items.Add(l_d tDtattable .Rows(ll). Item("Choi ce_3"))
radRadiolist.Items.Add(l_d tDtattable .Rows(ll). Item("Choi ce_4"))
Me.PlaceHolder1.Controls.A dd(radRadi olist)
Next
For intCounter = 0 To l_dtDtattable.Rows.Count - 1 'ViewState("ProductFieldCo
Dim ll As Integer
ll = intCounter
Dim litLabel As System.Web.UI.LiteralContr
Dim txtTextBox As System.Web.UI.WebControls.
Dim radRadiolist As System.Web.UI.WebControls.
'add textbox control
txtTextBox = New System.Web.UI.WebControls.
txtTextBox.ID = Trim(l_dtDtattable.Rows(ll
txtTextBox.Text = Trim(l_dtDtattable.Rows(ll
txtTextBox.Width = System.Web.UI.WebControls.
'txt_qid1.Width = System.Web.UI.WebControls.
Me.PlaceHolder1.Controls.A
'add literal Controls
litLabel = New System.Web.UI.LiteralContr
litLabel.Text = "<b> " & l_dtDtattable.Rows(ll).Ite
Me.PlaceHolder1.Controls.A
'add Radiolist controls
radRadiolist = New System.Web.UI.WebControls.
radRadiolist.ID = "rad" & Trim(l_dtDtattable.Rows(ll
radRadiolist.Items.Add(l_d
radRadiolist.Items.Add(l_d
radRadiolist.Items.Add(l_d
radRadiolist.Items.Add(l_d
Me.PlaceHolder1.Controls.A
Next