Refer this simple example and implement in your code..
ASPX:
<asp:GridView ID="Gridmodule" runat="server">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="chk" runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:TextBox Text="" ID="txtSoftware" runat="server" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:GridView ID="gridselected" runat="server">
<Columns>
<asp:BoundField DataField="Software" HeaderText="Software" ItemStyle-Width="50" />
</Columns>
</asp:GridView>
<asp:Button ID="btnapply" runat="server" Text="Apply" OnClick="btnapply_Click" />
CS
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DataTable dt = new DataTable();
dt.Columns.Add("SomeColumn");
dt.Rows.Add("one");
dt.Rows.Add("two");
Gridmodule.DataSource = dt;
Gridmodule.DataBind();
}
}
protected void btnapply_Click(object sender, EventArgs e)
{
DataTable dt = new DataTable();
dt.Columns.Add("Software");
foreach (GridViewRow row in Gridmodule.Rows)
{
if (row.RowType == DataControlRowType.DataRow)
{
bool isChecked = (row.FindControl("chk") as CheckBox).Checked;
if (isChecked)
{
string a = (row.FindControl("txtSoftware") as TextBox).Text;
dt.Rows.Add(a);
}
}
}
foreach (GridViewRow row in gridselected.Rows)
if (row.RowType == DataControlRowType.DataRow)
{
string software = row.Cells[0].Text;
dt.Rows.Add(software);
}
gridselected.DataSource = dt;
gridselected.DataBind(); ;
}