sir,
I used rowindex for merging gridview cells.I got output about my requirement, but my problem is i want to edit data in gridview cells.
I am using rowcommand i got value from 0th row. But remaining values get null values. So Please try to solve my problem.
this is my code check it once solve my problem
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
timetbal tbal = new timetbal();
DataTable dk = new DataTable();
dk = tbal.viewcount();
int h = Convert.ToInt32(dk.Rows[0][1].ToString());
if (e.Row.RowIndex == j)
{
e.Row.Cells[0].RowSpan = h;
j = j + h;
}
else if (e.Row.RowIndex == j)
e.Row.Cells[0].RowSpan = h;
else
{
e.Row.Cells.Remove(e.Row.Cells[0]);
}
}
}
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "abc")
{
string s = e.CommandArgument.ToString();
Session["murali"] = s.ToString();
Response.Redirect("updatedata.aspx");
}
}