|
-
Jan 7th, 2009, 05:42 PM
#1
Thread Starter
New Member
[2008] Problem with DataViewGrid when set a focus to a paticular cell
Hello,
I want to jump in the DataViewGrid to the next cell (X-Axis) with help of the Return(Enter)-Key and not with the Tabulator-Key.
This is not necessary on the normal way with kind of setting properties.
So the way to influence this behaviour is to Override the "ProcessDialogKey" with help of Inheritance in a new class.
After creating the Inheritance-class where I can Override this function it is possible to jump with Return(enter) to the next cell.
But now I have a problem with giving the focus to a particular cell, like the following code below:
DataGridView1.Item(DataGridView1.CurrentCell.ColumnIndex + 1, DataGridView1.CurrentRow.Index).Selected = True
Then it will lead into an error, see below:
Operation is not valid because it results in a reentrant call to the SetCurrentCellAddressCore function.
The strange thing is that it is working when I use the DataViewGrid without the Inheritance.
So what needs to be done that it will work. Or is there a different solution for the jump function where I can use the Return-Key
without having the Override function.
If somebody needs more infos or more explanation, please let me know.
Many Thanks,
mbs-systems
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|