I use the code below to add a table with each datarow
it works, but it only add only 1 item per row. all i want to happen is it will display the first 3 on the first row and the 2nd 3 on the second row.. and so on..Code:TableRow rowItem = new TableRow(); TableCell cellColumnInfo = new TableCell(); cellColumnInfo.VerticalAlign = VerticalAlign.Top; cellColumnInfo.Width = 600; Label lblProdName = new Label(); lblProdName.Text = dr["ProductName"].ToString(); cellColumnInfo.Controls.Add(lblProdName); rowItem.Cells.Add(cellColumnInfo); Label lblProdDesc = new Label(); lblProdDesc.Text = "<br>" + dr["ProductDescription"].ToString(); cellColumnInfo.Controls.Add(lblProdDesc); //add the cells to the new row Table1.Rows.Add(rowItem);
how can I do that with asp.net?


Reply With Quote

