L.S.
I have an ultragrid which, by a user action, is bound to a particular bindingsource. Everything works fine. However, I have to click on a row (CellClickEvent = RowSelect) in order to make the KeyPress/KeyDown event work, and that's not desirable.
I have tried the following, without success:
- UltraGrid:Select().
- UltraGrid:Focus().
- UltraGrid:DataBind().
- UltraGrid:PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction:ActivateCell).
- UltraGrid:ActiveRow = StatusBarGrid:Rows:Item[0]. followed by UltraGrid:Selected:Rows:Add(UltraGrid:ActiveRow).
TIA.
Will
Hi Milko,
I have solved the issue by using the PreviewKeyDown event on the form. Although not the optimal solution; it works !
Have a nice weekend and thanks for your support.
Regards,
My 'complex' ultragrid is put on an System.Windows.Forms.UserControl.
when the usercontrol is instantiated, its constructor receives the reference to a form. Next the ultragrid is removed from the controlscollection of the usercontrol and added to the controlscollection of the the form.
That's in fact the only difference.
Any clues ?
regards,
Thx for the reply.
I also wrote a simple application containing just an ultragrid with some dummy data on a form and the KeyPress event fires are expected, so it should work in my more complex app.
Attached is my code. You will probably not be able to run it since it is written in the OpenEdge ABL/Progress 4GL.
I am going to study the differences between my complex and my simple ultragrid.
Hello Will,
Thank you for posting in our forum.
I followed the steps you suggested and was unable to reproduce the behavior you're describing. I have created a small sample project with a grid and one button. On button click I am calling UltraGrid.Select() or UltraGrid.Focus() methods. Then I pressed some keys on the keyboard and both KeyPress and KyeDown events got fired.
I have attached the sample project I used to test this. Please test this project on your PC and let me know if you succeed to reproduce this issue.
If the project does not work correctly, this indicates either an issue possibly specific to your environment, or a difference in the DLL versions we are using. My test was performed using version 15.1.20151.2141 in Infragistics Controls for Windows Forms Version 15 Volume 1. So could you please let me know the exact version of Infragistics components which you are using?
If the project does show the product feature working correctly, this indicates a possible issue in the code of your application. It will help if you can provide a small, isolated sample application that demonstrates the behavior you are seeing, or if this sample project is not an accurate demonstration of what you're trying to do, please feel free to modify it and send it back.
Please let me know if I can provide any further assistance.
Thank you for using Infragistics Controls.