Subject: Re: How identify active control name
Date: Mon, 13 Oct 2003 15:13:45 -0700
Lines: 22
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <
[email protected]>
Newsgroups: microsoft.public.dotnet.languages.vb
NNTP-Posting-Host: 168.158-60-66-fuji-dsl.static.surewest.net 66.60.158.168
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:146430
X-Tomcat-NG: microsoft.public.dotnet.languages.vb
I'm sorry, I gave you incorrect information. It does work when I use it,
for example, on a txtbox on a field on a winform but I am trying to make it
work for a field on a datagrid. That is, I am on a datagrid and I would
like to identify the field on the datagrid that I am on. I assume that is
considered by VS as the ActiveControl. My intent is to leave it and then
return to it. When I use code like the following under those circumstances
I get a result of nothing.
Str = activeControl.Name
Dim sParentName As String = ActiveControl.Parent.Name gives me the name of
the datagrid but I would like the field on the datagrid that I am currently
on.
Thank you in advance for your help.