hi

i want that if i click on a particular row of a datagrid then rows lying below and above the clicked one, should swap.i mean to say that the
row lying below the clicked one must reach above the clicked one and the rows lying above the clicked one must reach below the clicked one.

with regards
sharad

Recommended Answers

All 3 Replies

This all really depends with how you are binding your data. Are you using asp.net for this? c# or vb.net?

i too have a PROBLEM GUYS
I HAVE A GRIDVIEW
i can select a row
i have two image buttons(one showing up and the other showing down)
on clicking the button the selected row contents should be incremented by one and the upper row should come down

HI SATHIN,
IF you want to use serverside execution then its easy. Just follow my below tips:

1. let you have a table named student then add an extra column into this table named sort.
2. Initialy bind data based on sort column order.
3. When user click to up a student then you need to update sort column by +-1 for the selected student & for the previous(up)/next(down) row.
student
4. Now rebind the data.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.