Fórum Exibindo dados na Vertical #9204
09/09/2009
0
Indemberge Santos
Curtir tópico
+ 0Posts
09/09/2009
Fabio Mans
Veja um exemplo
<asp:Repeater ID="OcorrenciaRpt" runat="server">
<HeaderTemplate>
<table border="0" cellpadding="2" cellspacing="0" width="100%" style="font: verdana">
</HeaderTemplate>
<ItemTemplate>
<tr>
<td width="100%">
<%# Eval("MatriculaInclusao")%>
- <b>
<%# Eval("FUNCIONARIO") %>
</b>
</td>
</tr>
<tr>
<td width="100%">
<%# DataBinder.Eval(Container.DataItem, "DATAINCLUSAO") %>
<br />
<%# DataBinder.Eval(Container.DataItem, "OCORRENCIANOME") %>
</b>
</td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
Fabio
Gostei + 0
14/09/2009
Indemberge Santos
Gostei + 0
14/09/2009
Indemberge Santos
Gostei + 0
14/09/2009
Fabio Mans
Se sim, monta um HTML, sem se preocupar com os dados como você quer que fique seus dados. Assim que fizar me passo o HTML que te mostro.
Fabio
Gostei + 0
15/09/2009
Indemberge Santos
<HeaderTemplate>
<table border="0" cellpadding="2" cellspacing="0" width="100%" style="font: verdana">
</HeaderTemplate>
<ItemTemplate>
<tr>
<td width="100%">
<%#Eval("CodAluno")%>
<%#Eval("Nome")%>
</td>
</tr>
<tr>
<td> <%#DataBinder.Eval(Container.DataItem, "Descricao")%>
<%#DataBinder.Eval(Container.DataItem, "MB1")%>
<%#DataBinder.Eval(Container.DataItem, "MB1Rv")%>
</td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
Os dados estão sendo exibidos assim: 312116 DANIT LEA LANDER
Língua Portuguesa e Literatura 8,7 0
312116 DANIT LEA LANDER
Educação Física 8 0
312116 DANIT LEA LANDER
Artes 10 0
312116 DANIT LEA LANDER
Física 6,5 7,2
312116 DANIT LEA LANDER
Química 7 0
312116 DANIT LEA LANDER
Biologia 10 0
312116 DANIT LEA LANDER
Matemática e Lógica 8,8 0
312116 DANIT LEA LANDER
História 9 0
312116 DANIT LEA LANDER
Geografia 7,8 0
312116 DANIT LEA LANDER
Filosofia 10 0
312116 DANIT LEA LANDER
Sociologia 8,5 0
312116 DANIT LEA LANDER
Lingua Estrangeira 9 0 E eu gotaria que fosse algo assim, sendo que todos os dados em uma única linha: 312116 DANIT LEA LANDER Língua Portuguesa e Literatura 8,7 0 Educação Física 8 0 Artes 10 0 Física 6,5 7,2 Química 7 0 Biologia 10 0 Matemática e Lógica 8,8 0 História 9 0 Geografia 7,8 0 Filosofia 10 0 Sociologia 8,5 0 Lingua Estrangeira 9 0 Gostaria de colocar umas imagens, mas deu erro na hora de fazer o upload... Indemberge
Gostei + 0
16/09/2009
Indemberge Santos
Gostei + 0
16/09/2009
Fabio Mans
protected void Page_Load(object sender, EventArgs e)
{
List<NovoAluno> lista = new List<NovoAluno>();
lista.Add(new NovoAluno()
{
Ibm = "120299",
Nome = "JULINA MARTINS",
Componente = "Artes",
Mb1 = "0",
Rv1 = "0"
});
lista.Add(new NovoAluno()
{
Ibm = "120299",
Nome = "JULINA MARTINS",
Componente = "História",
Mb1 = "9.8",
Rv1 = "0"
});
lista.Add(new NovoAluno()
{
Ibm = "120295",
Nome = "RITA",
Componente = "Geografia",
Mb1 = "9.8",
Rv1 = "7"
});
lista.Add(new NovoAluno()
{
Ibm = "120295",
Nome = "CLAUDIA",
Componente = "Geografia",
Mb1 = "9.8",
Rv1 = "7"
});
Repeater1.DataSource = lista;
Repeater1.DataBind();
}
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ChamadoAluno.aspx.cs" Inherits="ChamadoAluno" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Repeater ID="Repeater1" runat="server">
<HeaderTemplate>
<table border="0" cellpadding="2" cellspacing="0" width="100%" style="font: verdana">
</HeaderTemplate>
<ItemTemplate>
<tr>
<td width="100%">
IBM
<%# Eval("IBM") %>
Nome
<%# Eval("Nome") %>
Componente
<%# Eval("Componente")%>
Mb1
<%# Eval("Mb1")%>
Rv1
<%# Eval("Rv1")%>
</b>
</td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
</div>
</form>
</body>
</html>
Gostei + 0
16/09/2009
Indemberge Santos
Gostei + 0
21/09/2009
Indemberge Santos
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)