protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
string[] Cardio = (string[])objDocter.getDocter_acc_prof();
if (e.Row.RowType == DataControlRowType.DataRow)
{
if (e.Row.Cells[2].Text == "Heart problem")
{
DropDownList ddlAssignDoc
= (DropDownList)e.Row.FindControl("ddlAssignDoc");
ddlAssignDoc.DataSource = Cardio;
ddlAssignDoc.DataBind();
}
}
}
我想比較網格視圖中的兩個模板列, 但它不工作..............請給出正確的方式來比較兩列GridView。謝謝如何比較GridView中的兩列值?
我錯過了什麼。你想要比較哪些列? – 2010-09-10 16:57:40
@Conrad Frix:實際上我在模板列中使用了DropDownList,我想根據column2值將其綁定。 – ashish 2010-09-10 17:27:27