开发者

string array to datarow array

开发者 https://www.devze.com 2023-02-25 10:39 出处:网络
I would like to assign string of array to a开发者_开发百科 datarow array My code is as follows protected void btnGenerate_Click(object sender, EventArgs e)

I would like to assign string of array to a开发者_开发百科 datarow array

My code is as follows

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
            }
        }
    }
}

Can any one help me


you'll want to set the GridViewRow.DataItem

http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridviewrow.dataitem.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号