DUVIDAS TABELA DINAMICA ASP.NET

JCMSIS 14/06/2012 11:53:22
#404136
Estou criando uma tabela dinamica em asp.net e preciso trazer informações na horizontal e na Vertical estou montando da seguinte forma:

Dim tab = New HtmlTable
For tb = 1 To 3
[ô]Dim row = New HtmlTableRow
For n = 1 To 3
Dim row = New HtmlTableRow
Dim Cel1 = New HtmlTableCell
TbFornecedores.Read()
tab.Border = 1
tab.CellPadding = 3
tab.CellSpacing = 3
tab.Align = [Ô]Center[Ô]
Dim lbl1 = New Label
lbl1.Text = IIf(IsDBNull(TbFornecedores([Ô]CotValorUnit[Ô])), 0, TbFornecedores([Ô]CotValorUnit[Ô]))
Cel1.Controls.Add(lbl1)
row.Cells.Add(Cel1)
tab.Rows.Add(row)
Next
Panel1.Controls.Add(tab)
Next

esta ficando assim :

55600.00
16200.00
25500.00
56065.00
39815.00
28259.00
47190.00
17050.00
27400.00

eu preciso que fique assim

Forn 1 Forn 2 Forn 3
55600.00 56065.00 47190.00
16200.00 39815.00 17050.00
25500.00 28259.00 27400.00

Alguem tem alguma sugestão?





KERPLUNK 14/06/2012 12:19:37
#404139
Resposta escolhida
Minhas sugestões seriam várias:
1 - Não trabalhe com o objeto DataTable, que é o que presumo que você esteja usando, mas sim com orientação a objeto
2 - Uma vez transformado em uma lista de valores por fornecedor, crie um webmethod que retorne essa lista
3 - Crie uma rotina Javascript que preenche uma <table> com os ítens que o webmethod retornar
JCMSIS 14/06/2012 13:15:50
#404145
Tem algum exemplo?
KERPLUNK 14/06/2012 13:35:09
#404148
Tópico encerrado , respostas não são mais permitidas