Bind to annotated typed dataset

Discussion in 'ASP .Net Datagrid Control' started by Sarah Klaum, Apr 30, 2004.

  1. Sarah Klaum

    Sarah Klaum Guest

    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!
     
    Sarah Klaum, Apr 30, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nedu N
    Replies:
    1
    Views:
    1,826
    Chris Taylor
    Oct 31, 2003
  2. Nedu N
    Replies:
    2
    Views:
    2,192
  3. William Gower
    Replies:
    2
    Views:
    4,179
    Brian Baker [MVP]
    Jul 26, 2004
  4. bill yeager

    trying to bind a typed dataset to a datagrid

    bill yeager, Sep 16, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    166
    bill yeager
    Sep 17, 2004
  5. novus
    Replies:
    9
    Views:
    260
    last component
    Dec 14, 2005
Loading...

Share This Page