protected void BindrcbmedicalCondition() { // ScriptManager.RegisterStartupScript(this, GetType(), "close", "setValues();", true); DataTable dt = GetDataTable("PresentingComplaints"); dt.PrimaryKey = new DataColumn[] { dt.Columns["ID"] }; if (Session["PCValue"] != null) { string[] pcRow = Session["PCValue"].ToString().Split('#'); foreach (string val in pcRow) { string[] pcCellvalue = val.Split(','); if (dt.Rows.Find(pcCellvalue[0]) != null) { DataRow dr = dt.Rows.Find(pcCellvalue[0]); dr["ChkVal"] = "1"; dr["ChkValText"] = pcCellvalue[2].ToString(); } } } RadGridPresenting.DataSource = dt; RadGridPresenting.DataBind(); //foreach (DataRow row in dt.Rows) //{ // string itemName = row["Name"].ToString(); // string itemVal = row["ID"].ToString(); // RadComboBoxItem item = new RadComboBoxItem(itemName, itemVal); // //if (Convert.ToInt32(row["CheckedVal"]) > 0) // //{ // // item.Checked = true; // //} // rcbPresentingComplaints.Items.Add(item); //} }
protected void BindrcbmedicalCondition() { // ScriptManager.RegisterStartupScript(this, GetType(), "close", "setValues();", true); DataTable dt = GetDataTable("PresentingComplaints"); RadGridPresenting.DataSource = dt; RadGridPresenting.DataBind(); //dt.PrimaryKey = new DataColumn[] { dt.Columns["ID"] }; //if (Session["PCValue"] != null) //{ // string[] pcRow = Session["PCValue"].ToString().Split('#'); // foreach (string val in pcRow) // { // string[] pcCellvalue = val.Split(','); // if (dt.Rows.Find(pcCellvalue[0]) != null) // { // DataRow dr = dt.Rows.Find(pcCellvalue[0]); // dr["ChkVal"] = "1"; // dr["ChkValText"] = pcCellvalue[2].ToString(); // } // } //} }