I Have a
'GridView' ,one of the
Column in My GridView is DropDownList,
I enter 1 Record into GridView means DropDownValue is 1,I enter 2 Record means DropDown Value is 2....like that i enter 'n' no .of Records into my GridView.
After entering the Records , I'm changing Dropdown value 7 to 2, then Automatically
2 is changed to 3 ,3 is changed to 4, 4 is changed to 5, 5 is changed to 6, 6 is Changed to 7.This is working fine.
After Changing the DropDownValues My GridView Records are like this.
BEFORE CHANING DROPDOWN VALUES
GRIDVIEW
Name Sort
A 1
B 2
C 3
D 4
E 5
F 6
G 7
AFTER CHANGING DROPDOWN VALUES
<pre lang="vb">GRIDVIEW</pre>
NAME SORT
A 2
B 3
C 4
D 5
E 6
F 7
G 1
Now, my question is ...
After Changing 'DropDownValues' My GridView Sorted Values are like this 2,3,4,5,6,7,1
Now again i want to Change /my DropDown Values means It's not Getting Correct Values.Why because GridValues are not in Sorted Order, In my Code I wrote like that type of code.After Changing Drop Values (SelectedIndexCahnged Event is completed) then also i want like This
GRIDVIEW
Name Sort
G 1
A 2
B 3
C 4
D 5
E 6
F 7
If my Grid like this ( After Completion Of SelectedIndexChanged) then, my Code is executed Perfectly, for that i'm setting GridView Property 'AllowSorting ="True"'.
But no use ,plz give any suggestion to do this.