M
Morris Neuman
eI'm working in VS 2008 C# on aWindows Form appliation with a gridview boud
to a daata source and a corresponding bindingNavigator. I Handle the
RowsRemoved event and test the bindingNavigatorDeleteItem.Pressed to see if
the user clicked the Delete button on the binding navigator befoe I issue a
MyDeleteRow() function (where I do other processing).
I need to test this because when a user clicks a Column Header to sort the
gridview I found that the RowRemoved event is generated when it does the
resort. I guess it deletes all the rows and then writes them out again, is
that true?
In testing I now find that the bindingNavigatorDeleteItem.Pressed is
actually false when the last row of the grid is deleted otherwise it is true
when ever the user Cllick the bindingNavigatorDeleteItem button to delete a
row. Why would ths be the case? It doesn't make sense.
How can I trap the event that the last row needs to be deleted and the user
did not cick the row header to sort the grid?
The only thing I can think of is check that there are ow Rows in the
Gridview is that valid?
to a daata source and a corresponding bindingNavigator. I Handle the
RowsRemoved event and test the bindingNavigatorDeleteItem.Pressed to see if
the user clicked the Delete button on the binding navigator befoe I issue a
MyDeleteRow() function (where I do other processing).
I need to test this because when a user clicks a Column Header to sort the
gridview I found that the RowRemoved event is generated when it does the
resort. I guess it deletes all the rows and then writes them out again, is
that true?
In testing I now find that the bindingNavigatorDeleteItem.Pressed is
actually false when the last row of the grid is deleted otherwise it is true
when ever the user Cllick the bindingNavigatorDeleteItem button to delete a
row. Why would ths be the case? It doesn't make sense.
How can I trap the event that the last row needs to be deleted and the user
did not cick the row header to sort the grid?
The only thing I can think of is check that there are ow Rows in the
Gridview is that valid?