vinay singh

vinay singh

  • NA
  • 10
  • 3.1k

How to swap or change column data

May 12 2011 7:07 AM
i bind a column of gridview with datset named as Position. which has values as follows-
1
2
3
4
0
0
0

i'm showing these values in textboxes in gridview..

i'll select a field and eneter my value.
if i change 3 to 1, den 1 should change to 3 like swapping or,
if i change 2 to 0 den 3 will be 2 and 4 will be 3 or like ordering,
and if i change 4 to 0 den no change because 4 is largest value
means i have to maintain the order...

i have to implement this with a button click and new order will be stored n database.
i tried dis with many ways like 1st store all fields values in array and use swapping but got confused ...
please suggest
how do i implement dis..
thnx

Answers (3)