Border drawn in C# Table programmatically even if several adjacent horizontal & vertical cells are empty in the table
I want to programmatically have border on each and every row and column in the table even if several adjacent horizontal and vertical cells contains no value. The table control (MyTbl) is in ASP. I am programmatically populating the TableCell and TableRow in that MyTbl in ASP. The problem is, no line for the row border gets created if two consecutive rows for a given column are empty. My goal is to have row border for each and every row and column irrespective of the cell value being empty. The MyTbl control in ASP has Gridlines set as both and Borderstyle as solid.
MyTbl control in ASP gets populated as:
TableRow r = new TableRow();
//r.BorderStyle = BorderStyle.Solid;
TableCell cellID = new TableCell();
//cell.BorderStyle = BorderStyle.Solid;
cellID.Text = ..... some kind of value
//r.BorderStyle = BorderStyle.Solid;
r.Cells.Add(cellID);
MyTbl.Rows.Add(r);
I tried adding BorderStyle as Solid to both row and cell with no luck. If two corresponding rows for a given column are empty, no boundary line is drawn between two columns.
How can I have boundary line for each and every row and column even if several horizontal and vertical cells have no value?