Hey guys
actually my webform is working fine i can edit my datagrid and update my dataset....
But a problem i ran in to that i havent worked out is that when i search in my database/table i fill my dataset and get a result. Lets say i found to records and want to edit one of the found record. But when i click my edit link it refills my dataset and edits the item at the specified Index but that is not the found record....
cause the refill of the dataset....
hope someone has understood what i mean! i am not editing the found record but the record at (index1) in the table.....
thats actually cause i am using
how can i work around or Avoid that problem??? How can i find out which row i clicked on?
thanks a lot!
actually my webform is working fine i can edit my datagrid and update my dataset....
But a problem i ran in to that i havent worked out is that when i search in my database/table i fill my dataset and get a result. Lets say i found to records and want to edit one of the found record. But when i click my edit link it refills my dataset and edits the item at the specified Index but that is not the found record....
cause the refill of the dataset....
hope someone has understood what i mean! i am not editing the found record but the record at (index1) in the table.....
thats actually cause i am using
Code:
private void Edit_command(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
DataGrid1.EditItemIndex = e.Item.ItemIndex;
originalvalue = e.Item.Cells[1].Text;
Linkvalue = e.Item.Cells[8].Text;
Label1.Visible = true;
TextBox1.Visible = true;
TextBox1.Text = Linkvalue;
BindGrid();
}
how can i work around or Avoid that problem??? How can i find out which row i clicked on?
thanks a lot!