字符串数组到datarow数组

时间:2011-04-12 09:07:47

标签: c# asp.net gridview datarow

我想将数组字符串分配给数据行数组

我的代码如下

protected void btnGenerate_Click(object sender, EventArgs e)
{
    DataRow[] dRow; 
    foreach (GridViewRow grRow in grdACH.Rows)
    {
        CheckBox chkItem = (CheckBox)grRow.FindControl("checkRec");
        if (chkItem.Checked)
        {
            chkItm = true;
            chkcnt++;
            strBankTypeID += ((Label)grRow.FindControl("lblBankType")).Text.ToString();
            strBnkArray = strBankTypeID.Split(',');
            foreach (string str in strBnkArray)
            {
                //Here i have to assign my string of array to datarow
            }
        }
    }
}

任何人都可以帮助我

1 个答案:

答案 0 :(得分:1)