62,046
社区成员
发帖
与我相关
我的任务
分享
$("#btnAdd").click(function () {
var tb = $("#tb");
$("#tb tr").eq(1).clone(true).appendTo(tb);//添加一行,但是里面的数据和第一行数据是一样的
$("#tb tr").eq($("#tb tr").length - 1).children("td").eq(0).val("");//把新增行的第一个单元格的值赋为空
});
$("#btnCancel").click(function () {
$(this).parent().parent().remove();//移除选中行
});
foreach (GridViewRow item in this.GridView1.Rows) {
CheckBox chk = item.FindControl("CheckBox1") as CheckBox;
if (chk.Checked) {
this.DeleteRow(((TextBox)item.FindControl("txtOrderNo")).Text.Trim());
count++;
//break;
}
}
DataTable dt;
TableRow tr = dt.NewRow();
TableCell tc = new TableCell();
tr.Cells.Add(tc );
dt.Rows.Add(tr);