I have gridView with a checkbox and I bind it to a dataset. In database is a
column called "Assigned" and it contains 0 or 1. When I tried to bound it I got error .(cast error)
[
]
column called "Assigned" and it contains 0 or 1. When I tried to bound it I got error .(cast error)
[
]
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
PankaJ D147 reputationPosted Jan 3, 2011, 1:28 AM EST
Specified cast is not valid.
the above error is occered
ShankeyRank #972 · 2.1K reputationPosted Jan 3, 2011, 1:30 AM EST
You can do one thing that on rowbound event of the grid you can set the status of the check box to true or false based on your value.
Krishna GaradRank #191 · 12.8K reputationPosted Jan 3, 2011, 1:32 AM EST
PankaJ D147 reputationPosted Jan 3, 2011, 1:34 AM EST
ShankeyRank #972 · 2.1K reputationPosted Jan 3, 2011, 1:52 AM EST
Select IsNull(QStatus,0) as QStatus From MyTable
CrishRank #1,487 · 1.1K reputationPosted Jan 3, 2011, 5:30 AM EST
there may be possible some values are null in this checkboxes. so please check your database for that. Then after track one by one recods values of checkboxes in RowDatabound of gridview