ItemDataBound with field relations

A

Anonymous Poster

Having a problem with the ItemDataBound event. In my example I am binding an
asp.net DataGrid to a child table in a typed dataset with two related
tables. Some of the columns display fields in the child, while others lookup
to the parent via a dataset relation. The grid displays correctly, but in
the ItemDataBound event, the cells for the fields in the parent table come
up as empty string!? Is this a bug or is there something else I need to do?

Simon
 
A

Anonymous Poster

As usual answered my own question... for some bizarre reason the relational
cells are getting rendered inside a <span> tag, so I had to get to them as
(Label)e.Item.Cell[0].Controls[0].Text rather than e.Item.Cell[0].Text..
weird.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
474,265
Messages
2,571,069
Members
48,771
Latest member
ElysaD

Latest Threads

Top