i try to add column in datatable :
dt.Columns.Add(new DataColumn("BoolProperty", typeof(bool)));
and try to set value - false:
DataRow dr = dt.NewRow();
dr["BoolProperty"] = false;
But it does not work! Here is code:
try
{
con.server = this.server;
con.user = this.user;
con.password = this.password;
con.OpenConnection();
con.SqlQuery(Properties.Resources.databaseCatalogResource);
DataTable dt = con.QueryEx();
con.da.Fill(dt);
dt.Columns.Add(new DataColumn("BoolProperty", typeof(bool)));
DataRow dr = dt.NewRow();
dr["BoolProperty"] = false;
dataGrid.ItemsSource = dt.DefaultView;
}
catch (Exception ex)
{
MessageBox.Show("Грешка във връзката.", "Грешка");
}
but i need this column to be unchecked.
