In my last topic ( http://news.infragistics.com/forums/p/22571/83427.aspx#83427 )i managed to add a new row to my grid while tabbing in the last cell in the last row.
Now i want the same thing in another grid but the PreviewKeyDown won't fire for me. WIth some testing i found out that it would fire after being in a cell that has either a checkbox or a dropdownlist (that does not allow editing). I suspect that the problem lies in the fact that the last cell is just a regular cell that i'm editing at the time i'm trying to tab out of it. Do note that i can tab to the next cell just fine.
Anyone have any idea why the event doesn't fire and how i can get it to fire for my grid. I do need the PreviewKeyDown event btw because i want to know from which cell they are tabbing from.
Thanks in advance.
I'm not sure, but it probably has something to do with the fact that when a regular text cell goes into edit mode, the grid will display a TextBox control over the cell to allow editing. So the grid is not the ActivateControl at that point.
Are you sure PreviewKeyDown is not firing at all? Or is it firing, but skipping your code because you are checking for the ActiveControl being the grid?
Thanks for your reply.
I'm sure its not firing at all. There are no checks or anything yet in the event. However i did bind the event to the grid itself. I expected myself already that the ActiveControl wasn't the grid while editing. But i have no idea how i can bind the PreviewKeyDown event to the TextBox control.