Click here to Skip to main content
16,018,057 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

can anyone tell me how to focus on the next item in the grid if a row is deleted from grid. If the deleted item is the last in a grid ,focus on the previous item.

and same for treeview. means focus on the next item at the same level as the deleted item (or the previous item, if the deleted item was the last at this level). If the deleted item was the only one at this level, focus on the parent.

Thanks in advance

[edit]Urgency deleted - OriginalGriff[/edit]
Posted
Updated 28-May-12 20:07pm
v2
Comments
OriginalGriff 29-May-12 2:07am    
Urgency deleted: It may be urgent to you, but it isn't to us. All that your stressing the urgency does is to make us think you have left it too late, and want us to do it for you. This annoys some people, and can slow a response.

1 solution

Try dataGridView1.Rows[Rowindex].Selected = true;;
 
Share this answer
 
Comments
Saroj Kumar Sahu 29-May-12 3:08am    
How to get that Next rowindex ??

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900