Pasting into cells not firing the CurrentCellChanged event

When pasting text (Ctrl+V) into cells, the CurrentCellChanged event is not firing. How can I catch this event? I need an event where I can catch all text modifications. Even the CurrentCellEditingComplete event is not firing at the end when I jump off to another cell.

7 Replies

MS Mohamed Suhaib Fahad A. Syncfusion Team September 10, 2009 05:19 AM UTC

Hi Andre,

The CurrentCellChanged event gets fired properly. Please check the below sample,

http://www.syncfusion.com/uploads/redirect.aspx?file=sample_96b019ef.zip&team=development

You would have to do the following,

- Copy some text in clipboard, example "Hello world"
- Focus on any cell, and paste the content.
- In the sample, place a break point in the CurrentCellChanged handler written. It gets fired properly.

Please check it out.

Thanks,
Fahad


AS Andre Slenko September 10, 2009 01:17 PM UTC

I attached the sample application (password for ZIP:syncfusion) that demonstrates the pasting issue. I created a UserControl and placed it inside a Window. If you paste text into a cell, the event is NOT firing. Please let me know if you get different results.
Please help!



TestForEventFiring_aa946f19.zip


MS Mohamed Suhaib Fahad A. Syncfusion Team September 11, 2009 06:44 AM UTC

Hi Andre,

I am not able to reproduce this issue, I just ran your sample and it fires the events properly.

http://www.syncfusion.com/uploads/redirect.aspx?file=video_a466a4ee.zip&team=development

If you can create a DTrac incident, I could send you a link to download our latest refresh pack, You may want to check with it.

Please let me know.

Thanks,
Fahad


AS Andre Slenko September 11, 2009 12:36 PM UTC

Can you try tabbing to a cell (using the TAB key) and then pasting text into it. It seems that if you use the mouse, it works as intended. There is another issue: when you arrive at a particular cell by tabbing then paste some text, the next time you click the TAB key, nothing happens, you're still stuck at the same cell.


MS Mohamed Suhaib Fahad A. Syncfusion Team September 14, 2009 06:20 AM UTC

Hi Andre,

When you press the TAB key, it moves onto the next cell, but it doesn't enter the Edit mode. For that, you could press F2 and then paste the content. For the other question on TAB'bing out, you could set the,

Model.Options.ActivateCurrentCellBehavior = GridCellActivateAction.ClickOnCell;

and then try TAB'bing out once you paste the contents. Please let me know if you need any more details.

Thanks,
Fahad


AS Andre Slenko September 14, 2009 06:22 PM UTC

How can I make a cell editable after the TAB key press (catch some Focus event or something that I can make cells editable)? I don't want clients to hit F2 (or any other key to enter the edit mode) to paste. Actually if you paste text into a cell after tabbing to it, the text is being applied correctly, so why isn't the event firing correctly since the value is changed? I need a way to catch any cell changes (no matter how they're applied) so I can respond to them properly. I thought the CurrentCellChanged event was the one. Please let me know how I can make it work.



TestForEventFiring2_e938fdf3.zip


MS Mohamed Suhaib Fahad A. Syncfusion Team September 15, 2009 09:19 AM UTC

Hi Andre,

Thanks for the details. When you press TAB key, you could call the CurrentCell.BeginEdit to make the current cell focused when activated. Currently, we are working out details to allow listening to PreviewKeyDown/KeyDown event through code, Please create a DTrac incident with this Forum's title, We would update you through Direct Trac on this feature.

Thanks,
Fahad

Loader.
Up arrow icon