Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to change currentcontrol in grid only for selected row

Status
Not open for further replies.

Nifrabar

Programmer
Joined
Mar 16, 2003
Messages
1,343
Location
NL
Hi!

I am having a form with a grid.
Basicly a column holds the textbox1. I created a container with txt and cmdbutton.

Once I click in a cell I'd like to get my container as current control and once I leave the cell the text1 should be again the current control.

Would that be possible?

-Bart
 
Hi

It is possible.

The GotFocus event of every control should set the focus to the container.Text1 or command button as you want and transfer the control to that. Then the current control will remain whatever you want.

This is what we do in an incremental text search using a grid and a text box. Examples are available as FAQ on Search Grid samples and I am sure even one or two of my FAQs are there. One is FAQ184-1214

:-)

____________________________________________
ramani - (Subramanian.G) :-)
 
Hi Ramani,
Thanks for your reply.
As I do change the current control than it happens that only the 'selected' row gets the new control. All other rows just don't display anything than. Should I use the dynamiccurrentcontrol? But if so, how to tell the dynamiccurrentcontrol what is the 'selected'row ?
-Bart
 
Hi Mike,
Thanks for your reply.
But is not there a way to have only the 'selected' row an other 'current control'. Meanwhile the not-selected rows do use the good old text1 ?
-Bart
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top