我已經試過這一點,但沒有得到選中的值給另一個網格視圖的DataGridView使用複選框
string data = "";
foreach (GridViewRow row in GridView5.Rows)
{
if (row.RowType == DataControlRowType.DataRow)
{
CheckBox chkRow = (row.Cells[0].FindControl("chkCtr") CheckBox);
if (chkRow.Checked)
{
string Brand_Name = row.Cells[1].Text;
string Market_Name = row.Cells[2].Text;
string USC = row.Cells[3].Text;
string Manufacture = row.Cells[4].Text;
data = data + Brand_Name + " , ";
//;+ Market_Name + " , " + USC + ","+Manufacture+"";
gvrProducts.Visible = true;
gvrProducts.DataSource = data;
// ListBox1.DataBind();
gvrProducts.DataBind();
}
}
}
請幫
哇,這是最終的解決方案!! ..謝謝。我會帶來更多疑問;) – Prashanth