Problem with Template Column in Datagrid

Discussion in 'ASP .Net Datagrid Control' started by Robin, Aug 9, 2004.

  1. Robin

    Robin Guest

    When adding a template column to a datagrid the following error is displayed
    on page load. The datagrid is bound to a class and the fieldname does exist.

    No default member found for type 'myClass'.

    <ItemTemplate>

    <asp:Label id="Label3" runat="server" Font-Size="X-Small" Text='<%#
    Container.DataItem("myField") %>'></asp:Label>

    </ItemTemplate>

    Should the setting the data for the template column be defined differently
    or changes to the class?
     
    Robin, Aug 9, 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. Dexter
    Replies:
    1
    Views:
    426
    Eliyahu Goldin
    Jan 18, 2005
  2. Ken Varn
    Replies:
    1
    Views:
    984
    Ken Varn
    Aug 19, 2005
  3. Charleees
    Replies:
    2
    Views:
    8,246
    Eliyahu Goldin
    Jun 20, 2006
  4. Ravichandran Mahalingam

    Bound Column or Template Column (w dAdapater?) in DataGrid

    Ravichandran Mahalingam, Jan 9, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    231
    Ravichandran Mahalingam
    Jan 9, 2004
  5. Esperanza

    Template column base on another column value

    Esperanza, Feb 18, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    5
    Views:
    189
    Elton Wang
    Feb 21, 2005
Loading...

Share This Page