I need to bind my checkbox somewhere even if it's null so I won't get an error about invalid casting.
DataTable dt = new DataTable();
dt.Columns.Add("Name");
dt.Columns.Add("DeleteFlag", typeof(bool));
In ASP:
<asp:CheckBox ID="MyCheckBox" runat="server" Checked='<%# Bind("DeleteFlag") %>'
Enabled="False"/>
(If I remove this code, it works, but no checkbox visible ofc.) Maybe instantiate it with a value set to it already (true , false)
Can anyone help please? Will reply in comment if needed.