Hi grk2368,
I have created a sample which full fill your requirement
HTML
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/jquery-ui.js" type="text/javascript"></script>
<link href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/themes/blitzer/jquery-ui.css"
rel="stylesheet" type="text/css" />
<script type="text/javascript">
$(function () {
$("#dialog").dialog({
autoOpen: false,
modal: true,
title: "Transfer Row Details",
width: 450,
height: 450
});
$('#btnDisplay').click(function () {
$("#dialog").dialog('open');
return false;
});
$('[id*=chk]').click(function () {
if ($(this)[0].checked) {
var headerRow = $('#gvAll tbody tr:first').clone(true);
var row = ''; //$(this).closest('tr').clone(true);
var tds = '';
$($(this).closest('tr').find('td')).each(function (i, item) {
if (i > 0) {
tds += item.outerHTML;
}
});
row += "<tr>" + tds + "</tr>";
$('#gvSelected').append(row);
}
});
});
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:Button ID="btnDisplay" Text="Display" runat="server" />
<div>
<div id="dialog" style="display: none">
<asp:GridView ID="gvAll" runat="server" AutoGenerateColumns="false">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="chk" runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="CustomerID" HeaderText="Customer ID" />
<asp:BoundField DataField="ContactName" HeaderText="Contact Name" />
<asp:BoundField DataField="City" HeaderText="City" />
</Columns>
</asp:GridView>
<br />
<asp:GridView ID="gvSelected" runat="server">
</asp:GridView>
</div>
</div>
</form>
</body>
</html>
C#
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
string constr = ConfigurationManager.ConnectionStrings["conString"].ConnectionString;
string query = "select TOP 10 CustomerID, ContactName, City from customers";
SqlConnection con = new SqlConnection(constr);
SqlDataAdapter sda = new SqlDataAdapter(query, con);
DataTable dt = new DataTable();
sda.Fill(dt);
gvAll.DataSource = dt;
gvAll.DataBind();
dt.Clear();
dt.Rows.Add();
gvSelected.DataSource = dt;
gvSelected.DataBind();
gvSelected.Rows[0].Visible = false;
}
}