Posted on: 4/8/2011 12:04:32 PM | Views : 440

Hi Experts,
 
I have a project table in SQL server. For each project in the table I need to generate a checkbox. So I'm dynamically generating check boxes as follows.Checkbox list is inside a panel called "pnlProject".
void fillProjects() { DBConnect db = new DBConnect(); DataSet ds = new DataSet(); ds = db.getDataForgrid("SELECT project_id,project_name FROM project order BY project_name "); DataTable dt = ds.Tables[0]; CheckBox chkAll = new CheckBox(); chkAll.ID = "ChkSelectAllProject"; chkAll.Text = "Check All"; chkAll.Font.Italic = true; chkAll.Font.Bold = false; chkAll.AutoPostBack = true; chkAll.CheckedChanged += new EventHandler(chkAllProjects_CheckedChanged); pnlProject.Controls.Add(chkAll); CheckBoxList chkBox = new CheckBoxList(); chkBox.Font.Bold = false; fo ...

Go to the complete details ...