protected void fill_table() { int count = 0; int type = 0; if (RadioButton1.Checked) { type = 1; } else if (RadioButton2.Checked) { type = -1; } int positionId; Employee_pros pros = new Employee_pros(); if (DropDownList1.SelectedItem.ToString().Equals("ALL")) { positionId = 0; } else { positionId = pros.gerPositionId(Session["user"].ToString().TrimEnd(), DropDownList1.SelectedItem.ToString()); } List <List <string> > details = pros.getInterviews(Session["user"].ToString().TrimEnd(), type, positionId); foreach (List <string> temp in details) { count++; TableRow row = new TableRow(); TableCell number = new TableCell(); number.Text = (count).ToString(); row.HorizontalAlign = HorizontalAlign.Center; number.BackColor = System.Drawing.Color.Silver; TableCell candidate = new TableCell(); candidate.Text = temp[0]; TableCell position = new TableCell(); position.Text = pros.getPositionName(Int32.Parse(temp[1])); position.BackColor = System.Drawing.Color.Silver; TableCell date = new TableCell(); date.Text = temp[2]; TableCell time = new TableCell(); time.Text = temp[3]; time.BackColor = System.Drawing.Color.Silver; TableCell status = new TableCell(); status.Text = temp[5]; TableCell testres = new TableCell(); testres.Text = temp[6]; testres.BackColor = System.Drawing.Color.Silver; TableCell res = new TableCell(); res.Text = temp[7]; TableCell check = new TableCell(); RadioButton ch = new RadioButton(); ch.GroupName = "ch"; check.BackColor = System.Drawing.Color.Silver; check.Controls.Add(ch); row.Cells.Add(number); row.Cells.Add(candidate); row.Cells.Add(position); row.Cells.Add(date); row.Cells.Add(time); row.Cells.Add(status); row.Cells.Add(testres); row.Cells.Add(res); row.Cells.Add(check); Table1.Rows.Add(row); } }