Greetings for the day.
In my application I am sorting the gridview and also have Edit in that gridview, sorting works fine but when i click Edit, it puts the gridview in the original sorted order. when i click Edit - it lets me edit the row but it changes the order and show me the original record on that row in the edit mode.
where is the problem in my code i m not able to figure it out. looking for help. i need to finish it urgently.
below is my code:
protected void GridDispatchshow_RowEditing(object sender, GridViewEditEventArgs e)
{
GridDispatchshow.EditIndex = e.NewEditIndex;
Label lblpblm = (Label)GridDispatchshow.Rows[e.NewEditIndex].Cells[10].FindControl("lblproblemfaced");
Label lbladd = (Label)GridDispatchshow.Rows[e.NewEditIndex].Cells[11].FindControl("lblproblemfaced");
fillgridview();
DropDownList ddlpblm = (DropDownList)GridDispatchshow.Rows[e.NewEditIndex].Cells[10].FindControl("ddlpblmfaced");
ddlpblm.SelectedValue = lblpblm.Text;
DropDownList ddladd = (DropDownList)GridDispatchshow.Rows[e.NewEditIndex].Cells[11].FindControl("ddladdressinvalid");
ddladd.SelectedValue = lbladd.Text;
Bookmarks