Click here to Skip to main content
15,915,336 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,
This is my actual grid.

ID Martial Status Gender
Edit 101 Single Female
Edit 102 Single Male
Edit 103 Married Male
Edit 104 Single Female

Before clicking on edit button I did sorting on “Martial Status”.So records are changed like this,

ID Martial Status Gender
Edit 103 Married Male
Edit 104 Single Female
Edit 101 Single Female
Edit 102 Single Male

So now I want to edit 103 record but it gets 101 record like this,

ID Martial Status Gender
Update Cancel 101 Single Female
Edit 102 Single Male
Edit 103 Married Male
Edit 104 Single Female

So what went wrong & how to solve this issue????

Thanks in advance,
VenkiDesai.
Posted
Updated 22-Aug-12 3:42am
v2

You can show grid Item Index instead of showing original Id as
<%# (Container.DataItemIndex) + 1%>
 
Share this answer
 
Comments
Venki Desai 22-Aug-12 9:44am    
Sorry I didn’t clearly explain one point I missed here,
Before clicking on edit button I did sorting on “Martial Status”
So records are changed.
So now I want to edit 103 record but it gets 101 record.
This is the actuall point I want to ask but it missed when writing the post.
Please see the above post Now i posted correctly
Called the sorting function in row editing,row cancel edit & updating.
So issue solved.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900