<asp:TemplateField HeaderText="Load port"> <ItemTemplate> <table runat="server" id="tblLoadPort" style="height:100%" > </table> </ItemTemplate> <ItemStyle Width="150px" Height="100%"/> <HeaderStyle VerticalAlign="Middle" HorizontalAlign="Left" Font-Size="Small" /> </asp:TemplateField>
HtmlTable tblLoadPort = (HtmlTable)e.Row.Cells[6].FindControl("tblLoadPort"); System.Web.UI.HtmlControls.HtmlTableRow Tr = new HtmlTableRow(); HtmlTableCell Tc = new HtmlTableCell(); Tc.InnerText ="Some Text"; if (CargoWiseDetails[e.Row.RowIndex].LoadPort_SOFStatus_Details != null & CargoWiseDetails[e.Row.RowIndex].LoadPort_SOFStatus_Details.Count > 0) { Tc.Attributes.Add("class", PresentationUtils.FillLegend(CargoWiseDetails[e.Row.RowIndex].LoadPort_SOFStatus_Details[0].SOFStatus)); } else { Tc.Attributes.Add("class", "cssGray"); } Tr.Cells.Add(Tc); tblLoadPort.Rows.Add(Tr);
<table width="100%" height="970" bgcolor="blue"> </table>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)