CheckListBox
Hello Friends,
i am using checklistbox to select month in a window application.when retrieve the data particular information which are saved by checklistbox and set checked them . but i want to them the particular item of checklistbox which have value bacame disable how it possible . my coding is-
public void monthDetail()
{
if (txtRagis.Text != "")
{
sql = "SELECT * from FeeMonthDetail WHERE RagisterNo='" + txtRagis.Text + "'";
DataSet ds = new DataSet();
cmd.CommandText = sql;
cmd.Connection = con;
adpt.SelectCommand = cmd;
adpt.Fill(ds);
if (ds.Tables[0].Rows.Count > 0)
{
DataTable dt = (DataTable)ds.Tables[0];
for (int a = 1; a < dt.Columns.Count; a++)
{
if (dt.Rows[0][a].ToString() == "True")
{
checkedListBox1.SetItemChecked(a-1, true);
}
}
}}}
|