I did come to know that binding gridview with javascript is really challenging task .So, I solved the problem by writing code in aspx.Cs page and it did work..took CommandName and command argument property in the Button item template of Gridview and wrote the code on RowCommand event of Gridview for generating similar row..Thanks
protected void grdVwCarCase_RowCommand(object sender, GridViewCommandEventArgs e)
{
int index = Convert.ToInt32(e.CommandArgument.ToString());
if (e.CommandName == "New")
{
DataTable dt = new DataTable();
dt.Columns.Add("Parameter");
dt.Columns.Add("Operation");
dt.Columns.Add("text1");
dt.Columns.Add("Condition");
dt.AcceptChanges();
for (int i = 0; i < grdVwCarCase.Rows.Count; i++)
{
DataRow dr = dt.NewRow();
dr["Parameter"] = ((DropDownList)(grdVwCarCase.Rows[i].Cells[0].FindControl("drpFieldParameter"))).SelectedValue;
dr["Operation"] = ((DropDownList)(grdVwCarCase.Rows[i].Cells[0].FindControl("ddlOperation"))).SelectedValue;
dr["text1"] = ((TextBox)(grdVwCarCase.Rows[i].Cells[0].FindControl("txtFreeText"))).Text;
dr["Condition"] = ((DropDownList)(grdVwCarCase.Rows[i].Cells[0].FindControl("ddlCondition"))).SelectedValue;
dt.Rows.Add(dr);
if (i == index)
{
DataRow dr1 = dt.NewRow();
dt.Rows.Add(dr1);
}
}
grdVwCarCase.DataSource = dt;
grdVwCarCase.DataBind();
}
}