473,386 Members | 1,705 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,386 software developers and data experts.

How do I make my data grid, row selectable rather than cell


Visual Studio 2003 .Net / C#

I have a Datagrid on the screen that I can tab into at the relevant point in
my tab cycle. Basically the datagrid displays rows of basic information and
if the user double clicks in the margin of the datagrid it selects a row and
changes the page to a more detailed view of that row. However the users seem
to have an aversion to using the mouse so I am trying to create a nice tab
sequence, whereby when they tab into the browser it selects the first row,
then they can use the arrows to navigate up and down the rows, and press
enter to launch the details page. Is this possible?? When I jump into the
datagrid it highlights a cell not a row. I tried to select the row in the
code like so:

dgJobs.Select(o)

which looks to select it, but then when you navigate with the arrows it just
goes to the cell below, and when you press enter it does nothing, even though
I have a trigger on this key press. Any ideas?

Thanks
Aug 26 '05 #1
1 1682
Hi!
I tried to select the row in the code like so:

dgJobs.Select(o)

which looks to select it, but then when you navigate with the arrows it
just goes to the cell below, and when you press enter it does nothing,
even though I have a trigger on this key press. Any ideas?


Try to put this piece of code into 'CurrentCellChanged' event:

dgJobs.Select(dgJobs.CurrentCell.RowNumber);

Cheers,
Piotrek

Aug 29 '05 #2

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

Similar topics

5
by: John | last post by:
Hi: I'd like to implement a simple map, which is a 2-D plane with many points, e.g., 100. The points are not evenly distributed, i.e., some points may have two neighbor points; some may have 5...
1
by: Ananth | last post by:
Hi, I have a question regarding data grids My application requires me to use a grid for displaying data, however I would not be using a database for procuring the data, instead I would be...
2
by: Jeremy S | last post by:
In a Web Forms application I present users with a list of items - each of which the user is to assign to a grid. The grid is N rows by 3 columns. The users enter the desired target cell for each...
9
by: Sean | last post by:
I am using a datagrid to display some data. I notice when I click in a cell where the data is longer than the cell width, it truncates the end of the data off. For example: The data is: This...
1
by: Steve | last post by:
Visual Studio 2003 .Net / C# I have a Datagrid on the screen that I can tab into at the relevant point in my tab cycle. Basically the datagrid displays rows of basic information and if the user...
15
by: anthonyberet | last post by:
Hello again - rather a newbie here... I want to work on a sudoku brute-forcer, just for fun. I am considering different strategies, but first I need to decide on the data-structure to use for...
7
by: John J. Hughes II | last post by:
I have a DataGridView with a TextBoxColumn. I setting the data source to a List<stringvalue in a static class. The list is filled from a background thread. So far all is fine and it works...
6
by: insirawali | last post by:
Hi all, I have this problem, i need to know is there a way i cn use the data adapter's update method in this scenario. i have 3 tables as below create table table1{ id1 int identity(1,1)...
0
by: jchaturv | last post by:
All, I have a customized DataGridView where I have implemented extra functionality and bounded datasource in the same custom DataGridView (Using C# and .NET). Now, I could able to use it...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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.