Showing results for 
Search instead for 
Do you mean 
Reply
Solved! Go to solution

How to set focus on updated row after updating row in DataGridView?

I am using a ButtonMoveUp to change the Index value of a selected row. This is working fine but after I change the index value I need to select another row then back to the original row to update it again.How to set focus on updated row after updating row in DataGridView?

Rulestream ETO Version 8.12.0.7556
Solid Edge ST7
1 REPLY
Solution
Solution
Accepted by topic author JohnAsp
‎05-04-2017 10:37 AM

Re: How to set focus on updated row after updating row in DataGridView?

[ Edited ]

I've not found such functionality among standard Rulestream tools.
I think this index ordinary is used - only to get the information (which item is selected), not to manipulate items within grid.

1. To control focus on grids you can create custom UI control ( VisualBasic UI DataGrid Control):
https://msdn.microsoft.com/en-us/library/y4ddh1ac(v=vs.90).aspx

2. The second approach (to move items up and down through the grids) - is to set indexes to each item, then to sort the items in the grid by the indexes. Setup the 'move up' and 'move down' buttons to change the indexes (of the item selected and the next one) and to refresh the view.