First, let me name the tables as it will be easy for you all to understand which table I'm referring to. Table AA is the table which contains several Table BBs. Right now, I have all the BBs in Table AA. So whenever I generate BBs in the Table AA, each BB fills each row of Table AA. (<----So far, I have code for this)

Now, my question is, how to align BBs to the next column of Table AA if (e.g.3 rows filled with 3 tables), and I want to place the subsequent tables into the next column of Table AA till the maximum row of 3 is filled and then move the remaining to the next column and so forth.

 str["Apps"] += "<table align=\"center\"><tr align=\"center\" style=\"outline:thin solid\"><td width=\"100px\">";


 if (myAppCat.Rows.Count != 0 )

                            for (int y = 0; y < myAppCat.Rows.Count; y++)


                                str["Apps"] += "<table align=\"center\"><tr><td  bgcolor=\"#0099FF\" height=\"20px\" width=\"120px\" style=\"outline: thin solid\" align=\"center\">" +
                                                                   "<font align=\"center\" color=\"#FFFFFF\" face=\"Arial\">" + myAppCat.Rows[y]["Cat_Name"].ToString() + "</font>" +
                                                                   "</tr><tr><td height=\"4px\"></td></tr></table>";

                                str["Apps"] += "</td></tr>";

                        str["Apps"] += "</td></tr></table>";

Related posts

Recent Viewed