Specified cast is not valid
Hello,
I've got a gridview that has a checkbox as the first column, allowing the user to select that row.
I'm returning a value from the database to indicate whether the checkbox should be pre-checked...pretty standard, so I thought.
whenI do this:
<asp:TemplateField HeaderText="GetComplaint">
<ItemTemplate>
<asp:CheckBox ID="chkAvail" runat="server" Checked='<%# Bind("ID") %>' />
</ItemTemplate>
</asp:TemplateField>
It gives the error: System.InvalidCastException: Specified cast is not valid.
Please Help.
Thanks
|