Click here to Skip to main content
15,917,632 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have that code for fill my table:
VB
Dim TBLRow As New TableRow
       Dim TBLCell As New TableCell

       If DistinctSubAssy.Rows.Count > 0 Then
           For a = 0 To DistinctSubAssy.Rows.Count - 1

               ' Afli prima denumire
               Dim SubAssy As String = DistinctSubAssy(a).SubAssy
               Dim GetRowSpanForThisSubAssy As Integer = Adapter.DistinctProductType(SelectedCategory, SubAssy)
               Dim DistinctProductType As MV_SamplesOrders.SelectionsDataTable = Adapter.GetDistinctProductType(SelectedCategory, SubAssy)

               TBLCell = New TableCell
               TBLCell.RowSpan = GetRowSpanForThisSubAssy
               TBLCell.Text = SubAssy
               TBLRow.Cells.Add(TBLCell)

               For b = 0 To DistinctProductType.Rows.Count - 1
                   Dim ProductType As String = DistinctProductType(b).ProductType
                   Dim GetSelection As MV_SamplesOrders.SelectionsDataTable = Adapter.GetDataByCategoryAndSubAssyAndProductType(SelectedCategory, SubAssy, ProductType)

                   TBLCell = New TableCell
                   TBLCell.Text = ProductType
                   TBLRow.Cells.Add(TBLCell)


                   TBLCell = New TableCell
                   For c = 0 To GetSelection.Rows.Count - 1
                       Dim Selection As String = GetSelection(c).Selection
                       Dim SelectControlPlan As String = GetSelection(c).ControlType

                       TBLCell.Controls.Add(New LiteralControl(Selection))
                       '----------------HERE------------
                       TBLCell.Controls.Add(New LiteralControl("<br />"))
                       TBLRow.Cells.Add(TBLCell)

                   Next

                   TBL_Selections.Rows.Add(TBLRow)
                   TBLRow = New TableRow

               Next
           Next
       End If


Where is comm '----------------HERE------------ i want to insert a checkbox but how?
A CheckBox for every value of my table.

Thanks a lot
Posted
Comments
F-ES Sitecore 24-Sep-15 6:04am    
Dim c as New Checkbox
' set up properties here like name, value etc
TBLCell.Controls.Add(c)
MoraruVladut 24-Sep-15 6:14am    
Yes but he put just one CheckBox, not for all value.
Gokulprasad05 14-Nov-15 6:48am    
did u know forEach loop

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900