I'm experiencing some interesting behavior on my application. I have a grid where I've allowed multi cell operations.
When I paste something on a selected cell using the ctrl+v keys, everything works as it should. However, if i try to simulate the behavior by using the following code.
private void pasteTSB_Click(object sender, EventArgs e) { ultraGrid1.PerformAction(UltraGridAction.Paste,false,false); }
The AfterPerformAction event is not raised. Any clues as to what may be happening?
I think the grid is not in the correct state to accept the Paste and then the After event is also not raised.
How can I verify what the right state is before pasting? how do i put the grid into the right state? Have in mind that the paste action is happening what is not happening is the after perform action event.
Here is what i do in pseudocode.
Grid.PerformAction(Paste);
Grid_BeforeMultiCellOperation(...){ SomeFlag = true; //Gets called when using ctrl+v on a selected cell. //Gets called when using performaction(Paste);}
Grid_AfterCellUpdate(...){ if(SomeFlag) DoSomething(...); //Gets called when using ctrl+v on a selected cell. //Gets called when using performaction(Paste);}
Grid_AfterPerformOperation(...){ SomeFlag = false; //Gets called when using ctrl+v on a selected cell. //DOES NOT get called when using performaction(Paste); <== why?}
Some flag is not set correctly when I use the performaction(paste).