| .NET DotNet Forum Index » ASP.NET Forum » Gridview Join Field Not showing.... |
|
Page 1 of 1 |
|
| Author |
Message |
| Miro... |
Posted: Fri Oct 30, 2009 12:52 pm |
|
|
|
Guest
|
asp.net vb.net ( but i dont think vb.net matters in this case )
I have a dataset with a TableAdapter
In the tableadapter I have some join fields as such:
[ SELECT ... ShoppingCartDetails.FrontColorID, MyColors_1.ColorDesc AS Expr1
.... WHERE ID = ... ]
The FrontColorID links to the other colors table.
If I click "preview" data within the table adapter - I can see it no
problem.
( both fields - the ID field and the description field from the other
table ).
But When I add a GridView to the aspx, make my objectdatasource my
tableadapter above, I cannot 'Add' any fields that were from the other
table. Even though they display in the preview.
Basically I want to display the Color Description - not the ID value in the
color table.
What 'link' am I missing for the gridview fields.
Thanks,
Miro |
|
|
| Back to top |
|
|
|
| Miro... |
Posted: Fri Oct 30, 2009 1:14 pm |
|
|
|
Guest
|
Got it - I think,
The primary TableAdapter needs the joins in it to have the fields there.
Seems I always find my answer after I try to explain it on the newsgroup.
Thanks,
Miro
"Miro" <miro at (no spam) beero.com> wrote in message
news:OpBolIZWKHA.4416 at (no spam) TK2MSFTNGP02.phx.gbl...
Quote: asp.net vb.net ( but i dont think vb.net matters in this case )
I have a dataset with a TableAdapter
In the tableadapter I have some join fields as such:
[ SELECT ... ShoppingCartDetails.FrontColorID, MyColors_1.ColorDesc AS
Expr1 ... WHERE ID = ... ]
The FrontColorID links to the other colors table.
If I click "preview" data within the table adapter - I can see it no
problem.
( both fields - the ID field and the description field from the other
table ).
But When I add a GridView to the aspx, make my objectdatasource my
tableadapter above, I cannot 'Add' any fields that were from the other
table. Even though they display in the preview.
Basically I want to display the Color Description - not the ID value in
the color table.
What 'link' am I missing for the gridview fields.
Thanks,
Miro
|
|
|
| Back to top |
|
|
|
|