Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DataGrid up and down

Status
Not open for further replies.

nphani

Technical User
Feb 10, 2002
104
0
0
US
Hello Friends,

I am writing a Windows Form which contains a DataGrid bound to a DataSet. The requirement has come up asking me to implement 2 buttons (Up and Down). If a user clicks on the Up button, the currently selected row in the datagrid should go up and same with down.

Say initially the Datagrid was:

1
2 <-- currently this is the selected row in the datagrid
3

when i click UP button, the grid should change as:

2 <-- currently this is the selected row in the datagrid
1
3

Hope i am clear. I am not sure how to implement this. Can somebody help me on this?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top