Q:

Convert 'System.Data.DataRow[]' to 'System.Data.DataRow'

I Have a DataTable in ViewState and the same DataTable is used to Data Bind a Gridview which have  Template Columns and calculated fields
Now when User press a Button All the Records from the Datatable of the selected Row (Checkbox)Should be copied to another data table
   public void GeneratePO1()
    {
        // get the datatable from Viewstate
        DataTable myDS = (DataTable)ViewState["BomData"];

        //create a new datatable to store New Selected Items
        DataTable dt = new DataTable();

        //clone the schme of the Orginal Datatble to new one
        dt = myDS.Clone();

        //Loop through each gridviewrows to find the Rows where checkbox column is checked
        foreach (GridViewRow di in tbl_bom.Rows)
        {
            CheckBox chkBx = (CheckBox)di.FindControl("chk_select");

            if (chkBx != null && chkBx.Checked)
            {
                //get the uniqueID of that row
                int skudetpk = int.Parse((di.FindControl("lbl_skudetpk") as Label).Text);

                //create a new datarow for dt
                DataRow dr = dt.NewRow();

                //query the orginal datatable and put it in new data row
                dr = myDS.Select("SkuDet_pk=" + skudetpk + "");//Error occurs here

                //add the datarow to datatable
                dt.Rows.Add(dr);

            }
        }

        Session["ItemforPO"] = dt;
    }

I am getting the below  error msg
Cannot implicitly convert type 'System.Data.DataRow[]' to 'System.Data.DataRow' 

A:

As per suggestion of Jon Skeet .I had added .Single() tio the datatable and then Instead of Adding the Row I had imported the row. That solved My issue
 public void GeneratePO1()
        {
            // get the datatable from Viewstate
            DataTable myDS = (DataTable)ViewState["BomData"];

            //create a new datatable to store New Selected Items
            DataTable dt = new DataTable();

            //clone the schme of the Orginal Datatble to new one
            dt = myDS.Clone();

            //Loop through each gridviewrows to find the Rows where checkbox column is checked
            foreach (GridViewRow di in tbl_bom.Rows)
            {
                CheckBox chkBx = (CheckBox)di.FindControl("chk_select");

                if (chkBx != null && chkBx.Checked)
                {
                    //get the uniqueID of that row
                    int skudetpk = int.Parse((di.FindControl("lbl_skudetpk") as Label).Text);

                    //create a new datarow for dt
                    DataRow dr = dt.NewRow();

                    //query the orginal datatable and put it in new data row
                    dr = myDS.Select("SkuDet_pk=" + skudetpk + "").Single();//Error occurs here

                    //import the datarow to datatable
                    dt.ImportRow(dr);

                }
            }

            Session["ItemforPO"] = dt;
        }

