Problem DataBinding checkBox in a DataGrid

G

Guest

I have a DataGrid with a checkbox as ItemTemplate....

<asp:DataGrid id="Datagrid3" runat="server" AutoGenerateColumns="False" >
<Columns>
<asp:TemplateColumn>
<ItemTemplate>
<asp:CheckBox id="Chk" Text="<%# Container.DataItem %>"
runat="server">
</asp:CheckBox>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:DataGrid>

in my codebehind file I have a query
Select productname form product, the results of which are held in a DataReader
and the DataReader is the source of Data for Datagrid3.

Query exectues fine but on the page I get the following instead of the
actual data.
System.Data.Common.DbDataRecord.

What am I doing wrong?

Thanx 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

Staff online

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
DewittMill
Top