Click here to Skip to main content
15,904,817 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
<itemtemplate>
<asp:CheckBox ID="CheckBox1" runat="server"Checked='<%#DataBinder.Eval(Container,"DataItem.Selected") %>' />


can anyone plz tell me where I m doing it wrong.
I have also tried
DataBinder.Eval(Container.DataItem,"Selected")

it throws an exception mentioned in subject
'System.Data.DataRowView' does not contain a property with the name 'Selected'

for reference I m working on the basis of this article:
http://www.ilearnttoday.com/c-aspnet-gridview-select-multiple-rows-in-a-grid-view-using-check-boxes
Posted
Updated 16-Jun-11 0:18am
v2
Comments
R. Giskard Reventlov 16-Jun-11 6:06am    
Is there a column in the data you return called 'Selected'?

this error means that your VS is working fine.
Selected is not a property of 'System.Data.DataRowView'.
"Checked" property of checkbox should either be true or false.
 
Share this answer
 
As per the link you provided, "Selected" must be a property (to which the check-boxes will be bound) in the DataSource. Please read (and understand) the article completely before implementing. Also please mention what are you trying to achieve.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900