471,313 Members | 2,113 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,313 software developers and data experts.

Set Focus on Button

Hi,

In my form i have dataGrid and button. my user can navigate between the
dataGrid cells by clicking the enter button. if the user left an empty row
(all cells are empty) i want that when he will click the last cell the focus
will be on the button.

i tried to write this code:

if(dataGrid1.CurrentCell==7)
{
ok_btn.Focus();
}
but that's not bringing the ok_btn to focus, it seems like it's a tabindex
problem, but i tried to change that too during runtime, but it didn't help.

what can i do?

thanks,
Gidi
Jan 2 '06 #1
0 1741

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by TSK | last post: by
7 posts views Thread by selen | last post: by
reply views Thread by Steve Bezner | last post: by
3 posts views Thread by Brian Henry | last post: by
16 posts views Thread by Stuart | last post: by
1 post views Thread by john ciriello | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.