kaisersoze Posted January 13, 2005 Posted January 13, 2005 How to move complete row up or down in datagrid or any grid is fine. Quote Note: I think as a programmer not as a human, so use my answer at your will
RobEmDee Posted January 13, 2005 Posted January 13, 2005 How to move complete row up or down in datagrid or any grid is fine. You need to manipulate the DataSource which your DataGrid is bound to.....if it is a DataTable, simply reposition the associated DataRow and it will be reflected in your DataGrid. Quote
donnacha Posted January 14, 2005 Posted January 14, 2005 How do you physically want to do this, with drag drop or what have you in mind. Quote Hamlet
kaisersoze Posted February 3, 2005 Author Posted February 3, 2005 How do you physically want to do this' date=' with drag drop or what have you in mind.[/quote'] 1. The user selects one row 2. there will be up arrow and down arrow. 3. If the user wants to move up, the user clicks up arrow button 4. If the user wants to move down, then the user clicks down arrow button 5. if the row is at the top then up arrow button becomes disabled 6. if the row is at the bottom then down arrow button becomes disabled Quote Note: I think as a programmer not as a human, so use my answer at your will
RobEmDee Posted February 4, 2005 Posted February 4, 2005 kaisersoze: I do the exact same thing you are describing in an application I developed through manipulation of the bound DataSource as I desribed above. I take the index of the selected row in the grid and retrieve the corresponding DataRow in the DataTable and then move the DataRow up or down one position. If the user hits index 0 or Rows.Count - 1, I disable the corresponding button. If the user selects row index 0 or Rows.Count - 1, I disable the corresponding button. Piece of cake. 1. The user selects one row 2. there will be up arrow and down arrow. 3. If the user wants to move up, the user clicks up arrow button 4. If the user wants to move down, then the user clicks down arrow button 5. if the row is at the top then up arrow button becomes disabled 6. if the row is at the bottom then down arrow button becomes disabled Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.