473,385 Members | 1,429 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Problem DataBinding checkBox in a DataGrid

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.
Nov 19 '05 #1
0 1023

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Joe Bloggs | last post by:
I am trying display the contents of a table in a web page, select certain rows from that table and then display the fields that I have selected (now table columns) as text in a Label object....
4
by: Marina | last post by:
Hi, There is a component that is binding the results of a search to a DataList. By clicking on an image in the datalist, the user can download that particular item. We are using the DataKeys...
8
by: Inigo Jimenez | last post by:
I have an ASP .net web application installed in a Windows 2003 server. This web application has a webform that has a Datagrid. This Datagrid is filled with the data of a SQL table. I have a...
0
by: mike | last post by:
Hi there: I've read an excellent "how to"-article by Microsoft (no. 306227) - partly cited cited at the end of this email). I have implemented the code related to the part "How to Add a...
0
by: vbMental | last post by:
I created a user control that, had a datalist with checkboxes inside of the item template. These checkboxes would not retain state. For instance, if I set them to checked inside of the load event...
2
by: wolfgang wagner | last post by:
hi all! im trying to edit data in a datagrid (like described here: http://aspnet.4guysfromrolla.com/articles/071002-1.aspx) but if i click the edit button i get the following error invalid...
0
by: louise raisbeck | last post by:
Hi there, I am databinding a datagrid on the onload with the usual !IsPostBack condition. I have to create some dynamic checkboxes, because i dont know how many i will need until the dataset...
0
by: Daniel Doyle | last post by:
Hello and apologies in advance for the amount of code in this post. I've also sent this message to the Sharepoint group, but thought that ASP.NET developers may also be able to help, even though...
30
by: dbuchanan | last post by:
ComboBox databindng Problem == How the ComboBox is setup and used: My comboBox is populated by a lookup table. The ValueMember is the lookup table's Id and the DisplayMember is the text from a...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.