Problem with Template Column in Datagrid

R

Robin

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?
 

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

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,187
Latest member
RosaDemko

Latest Threads

Top