PC Review


Reply
Thread Tools Rate Thread

How do i set focus to a single cell that i determine

 
 
=?Utf-8?B?TENI?=
Guest
Posts: n/a
 
      19th Aug 2005
I have a form with a datagrid. The datagrid contains 5 columns and 5 rows.

the cell of the last column and the last row in the datagrid is set to
editable. When the form loads, I want the current focus to be set to this
particular editable field in the datagrid. The focus should highlight
whatever data is in the datagrid field at that time.

How do I do this? Thank you


 
Reply With Quote
 
 
 
 
Ken Tucker [MVP]
Guest
Posts: n/a
 
      21st Aug 2005
Hi,

Dim dgc As New DataGridCell(3, 2)

DataGrid1.CurrentCell = dgc



Ken

---------------------------------

"LCH" <(E-Mail Removed)> wrote in message
news1930A53-1690-469C-8356-(E-Mail Removed)...
I have a form with a datagrid. The datagrid contains 5 columns and 5 rows.

the cell of the last column and the last row in the datagrid is set to
editable. When the form loads, I want the current focus to be set to this
particular editable field in the datagrid. The focus should highlight
whatever data is in the datagrid field at that time.

How do I do this? Thank you



 
Reply With Quote
 
=?Utf-8?B?TENI?=
Guest
Posts: n/a
 
      22nd Aug 2005
Thank you Ken Tucker your suggestion works

"Ken Tucker [MVP]" wrote:

> Hi,
>
> Dim dgc As New DataGridCell(3, 2)
>
> DataGrid1.CurrentCell = dgc
>
>
>
> Ken
>
> ---------------------------------
>
> "LCH" <(E-Mail Removed)> wrote in message
> news1930A53-1690-469C-8356-(E-Mail Removed)...
> I have a form with a datagrid. The datagrid contains 5 columns and 5 rows.
>
> the cell of the last column and the last row in the datagrid is set to
> editable. When the form loads, I want the current focus to be set to this
> particular editable field in the datagrid. The focus should highlight
> whatever data is in the datagrid field at that time.
>
> How do I do this? Thank you
>
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SETTING FOCUS TO A CELL IF SINGLE CLICKED James Microsoft Excel Programming 3 4th Oct 2008 03:04 PM
determine which control will get the focus =?Utf-8?B?TWljaGFlbA==?= Microsoft Dot NET Framework Forms 1 11th Aug 2006 02:55 PM
determine if a field is in focus Phil Hellmuth Microsoft Access VBA Modules 6 3rd May 2006 06:34 PM
determine if a field is in focus Phil Hellmuth Microsoft Access Forms 1 3rd Feb 2006 03:08 AM
Determine if a control has focus Josh Rolfe Microsoft Excel Programming 1 28th Jan 2006 08:22 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:38 PM.