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

DataGridViewColumns tab order

Hi

Is there a way to remove DataGridViewColumns from the tab order in a
DataGridView ?

Thx

Dieter De Doncker
Mar 31 '06 #1
3 4135
Dieter De Doncker wrote:
Hi

Is there a way to remove DataGridViewColumns from the tab order in a
DataGridView ?

Thx

Dieter De Doncker


You can catch when a Column gets focused and then move it to the next
one. Would that do it for you?

Chris
Mar 31 '06 #2
Chris wrote:
Dieter De Doncker wrote:
Hi

Is there a way to remove DataGridViewColumns from the tab order in a
DataGridView ?

Thx

Dieter De Doncker


You can catch when a Column gets focused and then move it to the next
one. Would that do it for you?

Chris


Forgot to say that you can use the CellEnter event to do this. Just set
your new column:

DataGridView.CurrentCell = DataGridView.Item(e.ColumnIndex + 1, e.RowIndex)

Chris
Mar 31 '06 #3
Hi Chris

Following your tip; this is my code now

if (e.ColumnIndex == contactNameDataGridViewTextBoxColumn.Index)
{
customersDataGridView.CurrentCell = customersDataGridView[e.ColumnIndex
+ 1, e.RowIndex];
}

at runtime it seems to work but, I get:

System.InvalidOperationException: Operation is not valid because it results
in a reentrant call to the SetCurrentCellAddressCore function.

Also this solution has the disadvantage that the cell cannot be selected by
mouse.

Dieter

"Chris" <no@spam.com> schreef in bericht
news:u7**************@TK2MSFTNGP09.phx.gbl...
Chris wrote:
Dieter De Doncker wrote:
Hi

Is there a way to remove DataGridViewColumns from the tab order in a
DataGridView ?

Thx

Dieter De Doncker


You can catch when a Column gets focused and then move it to the next
one. Would that do it for you?

Chris


Forgot to say that you can use the CellEnter event to do this. Just set
your new column:

DataGridView.CurrentCell = DataGridView.Item(e.ColumnIndex + 1,
e.RowIndex)

Chris

Apr 1 '06 #4

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

Similar topics

7
by: svilen | last post by:
hello again. i'm now into using python instead of another language(s) for describing structures of data, including names, structure, type-checks, conversions, value-validations, metadata etc....
9
by: Steven T. Hatton | last post by:
The following works: template <typename T> struct ID3M{ static const T ID; }; template <typename T> const T ID3M<T>::ID = {{1,0,0},{0,1,0},{0,0,1}};
15
by: | last post by:
The data file is a simple Unicode file with lines of text. BCP apparently doesn't guarantee this ordering, and neither does the import tool. I want to be able to load the data either sequentially...
27
by: Abdullah Kauchali | last post by:
Hi folks, Can one rely on the order of keys inserted into an associative Javascript array? For example: var o = new Object(); o = "Adam"; o = "Eve";
8
by: kaosyeti | last post by:
i have a (hopefully) small problem. i have created a system where a user enters customer information into a table through a form. this table has no primary key. there are 9 fields on the form to...
104
by: Beowulf | last post by:
I have the view below and if I use vwRouteReference as the rowsource for a combo box in an MS Access form or run "SELECT * FROM vwRouteReference" in SQL Query Analyzer, the rows don't come through...
13
by: bevanward | last post by:
Hi All I am finding unexpected results when inserted into a newly created table that has a field of datatype int identity (1,1). Basically the order I sort on when inserting into the table is...
1
by: A n g l e r | last post by:
Hello there. Can you give me your feedback about DataGridViewColumns .NET 2.0 by RustemSoft? Is it any good? What are the chief benefits from basing projects on this data grid? Thanks a...
25
by: DanicaDear | last post by:
Hello again Bytes...I missed you! First, background: In a hotstick lab, we ship orders every two years. We ship a new order and the customer uses the new box to return the previous year's order....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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$) { } ...
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?
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...

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.