We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Automated testing of grid controls

Thread ID:





21678 Nov 17,2004 07:15 AM Nov 17,2004 11:54 AM Windows Forms 2
Tags: GridControl
Administrator [Syncfusion]
Asked On November 17, 2004 07:15 AM

I''m trying to automate testing of our derived grid control using NUnit and NUnit Forms. One issue I have is that when I try to do a test that involves keyboard input, it''s failing because it''s trying to set focus to the grid as a whole instead of the cell in the grid, as each key is pressed. How can I get the System.Windows.Forms.Control reference of the current cell so that I can have NUnit Forms set the focus there for keyboard input? Pete

Administrator [Syncfusion]
Replied On November 17, 2004 10:10 AM

Not sure it will work for this setup, but you can try: this.grid.CurentCell.BeginEdit(); Or, maybe this.grid.CurrentCell.Renderer.Control.Focus(); You would probably need to check for nulls.

Administrator [Syncfusion]
Replied On November 17, 2004 11:54 AM

Thanks Clay. That will probably do it. Unfortunately, I''ve just discovered that NUnit Forms has no facility for me to pass it a Control object. It''s got a really screwed up architecture and wants a form and control name. Nor does it even store the actual control reference, so there''s no way to simply add a constuctor to pass in the control. Guess I''ve got some work to do. Thanks. >Not sure it will work for this setup, but you can try: > >this.grid.CurentCell.BeginEdit(); > > >Or, maybe > > >this.grid.CurrentCell.Renderer.Control.Focus(); > > >You would probably need to check for nulls.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.