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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
CrishPosted Jan 3, 2011, 10:30 AM
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
ShankeyPosted Jan 3, 2011, 6:52 AM
Select IsNull(QStatus,0) as QStatus From MyTable
PankaJ DPosted Jan 3, 2011, 6:34 AM
Krishna GaradPosted Jan 3, 2011, 6:32 AM
ShankeyPosted Jan 3, 2011, 6:30 AM
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.
PankaJ DPosted Jan 3, 2011, 6:28 AM
Specified cast is not valid.
the above error is occered