String was not recognized as a valid Boolean.

Sep 12 2017 4:20 AM
any one solve this problem: problem that below...
 
 
protected void tvMenu_HtmlRowPrepared(object sender, TreeListHtmlRowEventArgs e)
{
DataTable dtwbUserRights = new DataTable();
string strConnectionString = ConfigurationManager.ConnectionStrings["EchoITEMS"].ConnectionString;
SqlConnection Conn = new SqlConnection(strConnectionString);
Conn.Open();
SqlCommand cmd = new SqlCommand("GET_USER_RIGHTS_MENU_SP", Conn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@USER_ID", SqlDbType.BigInt).Value = Convert.ToInt32(ddlUser.SelectedItem.Value.ToString()); ;
cmd.CommandTimeout = 50;
SqlDataAdapter da = new SqlDataAdapter(cmd);
da.Fill(dtwbUserRights);
Conn.Close();

if (dtwbUserRights.Rows.Count > 0)
{
var _userRightList = from DataRow myRow in dtwbUserRights.Rows select myRow;
foreach (DataRow wbUserRights in _userRightList)
{
if (Convert.ToInt32(e.NodeKey) == Convert.ToInt32(wbUserRights["wbMenuId"].ToString()))
{

tvMenu.FindNodeByKeyValue(e.NodeKey).Selected = true;
(tvMenu.FindDataCellTemplateControl(e.NodeKey, tvMenu.Columns["wbCanView"] as TreeListDataColumn, "chkView") as CheckBox).Checked = Convert.ToBoolean(wbUserRights["wbCanView"].ToString());
(tvMenu.FindDataCellTemplateControl(e.NodeKey, tvMenu.Columns["wbCanEdit"] as TreeListDataColumn, "chkEdit") as CheckBox).Checked = Convert.ToBoolean(wbUserRights["wbCanEdit"].ToString());
(tvMenu.FindDataCellTemplateControl(e.NodeKey, tvMenu.Columns["wbCanDelete"] as TreeListDataColumn, "chkDelete") as CheckBox).Checked = Convert.ToBoolean(wbUserRights["wbCanDelete"].ToString());
//tvMenu.FindNodeByKeyValue(e.NodeKey).Selected = true;
//(tvMenu.FindDataCellTemplateControl(e.NodeKey, tvMenu.Columns["wbCanView"] as TreeListDataColumn, "chkView") as CheckBox).Checked = Convert.ToBoolean(userRight["wbCanView"].ToString());
//(tvMenu.FindDataCellTemplateControl(e.NodeKey, tvMenu.Columns["wbCanEdit"] as TreeListDataColumn, "chkEdit") as CheckBox).Checked = Convert.ToBoolean(userRight["wbCanEdit"].ToString());
//(tvMenu.FindDataCellTemplateControl(e.NodeKey, tvMenu.Columns["wbCanDelete"] as TreeListDataColumn, "chkDelete") as CheckBox).Checked = Convert.ToBoolean(userRight["wbCanDelete"].ToString());
}
}
}

Answers (4)