473,394 Members | 1,759 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

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

LCH
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
Nov 21 '05 #1
2 4285
Hi,

Dim dgc As New DataGridCell(3, 2)

DataGrid1.CurrentCell = dgc

Ken

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

"LCH" <LC*@discussions.microsoft.com> wrote in message
news:D1**********************************@microsof t.com...
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

Nov 21 '05 #2
LCH
Thank you Ken Tucker :) your suggestion works

"Ken Tucker [MVP]" wrote:
Hi,

Dim dgc As New DataGridCell(3, 2)

DataGrid1.CurrentCell = dgc

Ken

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

"LCH" <LC*@discussions.microsoft.com> wrote in message
news:D1**********************************@microsof t.com...
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

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: raj | last post by:
Hi, The focus in the datagrid is not lost even after leaving the datagrid. The selected cell is highlighted even when the focus from the datagrid is lost. This happens only after the .NET...
6
by: MickG | last post by:
Hi, I am trying to validate these values, this seems to work fine for the phone number and name but I am trying to get the program to fail to submit and set the focus on the date when 2006 is...
6
by: joe | last post by:
Hi Everyone, could anyone comment on the following problem: I have a textbox being appended to a cell in a table, and am trying to call focus() on like this: <snip> c01.removeChild(answerbox);...
2
by: Liam McNamara | last post by:
I am having the same problem as the one I found in google below: ...
21
by: Sharon | last post by:
I have added an auto scroll feature to my DataGrid control like this: private void DoAutoScroll() { DataView dv = m_DataGrid.DataSource as DataView; DataGridCell cell = m_DataGrid.CurrentCell;...
8
by: jonny_morrisuk | last post by:
Hi! I have a scrollable css table cell thing going on, and would like to set the initial page focus to that cell in order that scrolling up and down with the cursor keys (or mouse scroll wheel...
2
dlite922
by: dlite922 | last post by:
Before traversing my code, here's what my goal is and what this function does: I have a table of fields that dynamically grows as the user enters information. A minimum of 3 rows must always...
1
by: Lcoggshall | last post by:
Hi everyone, I am on site and have a huge issue I need an answer to ASAP. I have a Touch screen application. This app has a bbrower with 1 cell that is editable. Because it is a touch screen,...
4
by: foolmelon | last post by:
Before AJAX, we were able to focus a cell in a gridview during a fullpage postback. After putting the gridview inside an UpdatePanel, we cannot focus a cell in this gridview anymore. Does anybody...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.