protected override void Render(HtmlTextWriter output) { if (selectedrow == null && rows.Count > 0) { selectedrow = rows[0]; } output.WriteLine("<div style='overflow:auto; height:100%; background:white; width:100%' >"); output.WriteLine("<table class='Fonts' cellSpacing=0 height=100% width=100% id='" + this.ClientID + "_m'>"); for (int i = 0; i < rows.Count; i++) { mcRow row = rows[i]; string cssClass; if (row == selectedrow) { cssClass = "MCLSelected"; } else { cssClass = "MCLRowStyle"; } output.WriteLine("<tr class=" + cssClass + " id='" + row.ClientId + "'onclick='rowSelected(\"" + row.ClientId + "\")'>"); output.WriteLine("<td width=0%>"); output.WriteLine(row.C1Text); output.WriteLine("</td>"); output.WriteLine("<td width=50%>"); output.WriteLine(row.C2Text.Replace("<", "<")); output.WriteLine("</td>"); output.WriteLine("<td width=50%>"); output.WriteLine(row.C3Text); output.WriteLine("</td>"); output.WriteLine("</tr>"); } output.WriteLine("<tr height=100%></tr>"); output.WriteLine("</table>"); output.WriteLine("</div>"); }
public mcRow Add(mcRow r) { rows.Add(r); return((mcRow)rows[rows.Count - 1]); }
public mcRow Add(mcRow r) { rows.Add(r); return (mcRow)rows[rows.Count-1]; }
protected override void Render(HtmlTextWriter output) { if(selectedrow == null && rows.Count > 0) selectedrow = rows[0]; output.WriteLine("<div style='overflow:auto; height:100%; background:white; width:100%' >"); output.WriteLine("<table class='Fonts' cellSpacing=0 height=100% width=100% id='" + this.ClientID + "_m'>"); for(int i = 0; i < rows.Count; i++) { mcRow row = rows[i]; string cssClass; if(row == selectedrow) cssClass = "MCLSelected"; else cssClass = "MCLRowStyle"; output.WriteLine("<tr class="+ cssClass + " id='"+ row.ClientId +"'onclick='rowSelected(\"" + row.ClientId + "\")'>"); output.WriteLine("<td width=0%>"); output.WriteLine(row.C1Text); output.WriteLine("</td>"); output.WriteLine("<td width=50%>"); output.WriteLine(row.C2Text.Replace("<","<")); output.WriteLine("</td>"); output.WriteLine("<td width=50%>"); output.WriteLine(row.C3Text); output.WriteLine("</td>"); output.WriteLine("</tr>"); } output.WriteLine("<tr height=100%></tr>"); output.WriteLine("</table>"); output.WriteLine("</div>"); }