Click here to Skip to main content

naveensanagasetti asked:

Open original thread
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.
Tags: C#4.0, ASP.NET

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the The Code Project Open License (CPOL).



Advertise | Privacy | Mobile
Web04 | 2.6.130516.1 | Last Updated 26 Mar 2009
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid