My code is below...
//code in main form
private
void next_Click(object sender, EventArgs e){
//pcnpc_grid.Update();
//pcnpc_grid.CurrentCell = pcnpc_grid.Rows[4].Cells[1];
_initiative_list.Next();
//pcnpc_grid.CurrentCell = pcnpc_grid.Rows[4].Cells[1];
this.pcnpc_grid.Refresh();}
//code in class that contains datatable (in dataset)
public
void Next(){
DataView SortedInit = pcnpcs.pcnpcs.DefaultView; //SortedInit.RowFilter = "done <> 'X'";SortedInit.Sort =
"done,init desc";SortedInit[0][
"done"] = "2"; Debug.WriteLine(SortedInit[0]["pcnpcs"]); Debug.WriteLine(SortedInit[0]["done"]);OrderOnInit();
}
So what i'm wondering is what is the correct way to update a datagridview after you've altered data in a xml dataset it's binded too. Should I use some command to deselect all the items I also notice that if I call update after the dataset has been changed, soemtimes this will undo changes as the grid hasn't changed (make sense ). Also, if you notice anything else that looks blatantly wrong let me know.
Any help would be greatly appreciated.

datagridview not updating correctly (row selection blocking?)
John Bledsoe
To commit the edit you can call EndCurrentEdit on the CurrencyManager like so:
this.BindingContext[customDataTable].EndCurrentEdit();
Hope this helps,
-mark
DataGridView Program Manager
Microsoft
This post is provided "as-is"