This question is locked. New answers and comments are not allowed.
Hi,
I have a GridView into which I'm allowing the user to insert rows. This works perfectly if the datasource to which it is bound already contains items - in other words, when the user can see data in the grid, then calling the BeginInsert method works correctly.
But if the grid is empty, then calling BeginInsert() seems to have no effect. I have tried both hooking a button up to call the BeginInsert() method (in which, if I set a breakpoint, I can see the method being called), and also by using the Insert key. When the grid is populated, a blank row is inserted correctly, but when empty, nothing happens.
What am I doing wrong?
I have a GridView into which I'm allowing the user to insert rows. This works perfectly if the datasource to which it is bound already contains items - in other words, when the user can see data in the grid, then calling the BeginInsert method works correctly.
But if the grid is empty, then calling BeginInsert() seems to have no effect. I have tried both hooking a button up to call the BeginInsert() method (in which, if I set a breakpoint, I can see the method being called), and also by using the Insert key. When the grid is populated, a blank row is inserted correctly, but when empty, nothing happens.
What am I doing wrong?