Bind to annotated typed dataset

S

Sarah Klaum

All,

I haved created a typed dataset and annotated the elements using the
codegen:typedName attribute.

<xs:element name="SOME_FIELD" codegen:typedName="SomeField"
type="xs:decimal" minOccurs="0" />

I would like to bind to my typed dataset and reference the fields via
the annotation with a bound or templated column, like so:

<asp:BoundColumn DataField="SomeField" SortExpression="SomeField"
HeaderText="SomeField"></asp:BoundColumn>

OR

<asp:Templatecolumn SortExpression="SomeField" HeaderText="SomeField">
<ItemTemplate><%# DataBinder.Eval(Container.DataItem,
"SomeField")&></ItemTemplate>
</asp:Templatecolumn>

Is this possible? It only appears to work if the
DataField/SortExpression etc. is set to the element's name (SOME_FIELD)
and not my annotated name.

Thanks in advance!
 

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

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top