string array to datarow array
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
精彩评论