Click here to Skip to main content
15,902,921 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Everybody...
Is there any option to get the cell value of previous row in a gridview????
plz help me...
Details:
In gridview i want to blank the row values which are being repeated...
Here is the example:
--------------------
Site Model No
---- ----- --
bbsr truck 2
bbsr bus 4
bbsr car 5
i want to make like this
------------------------
Site Model No
---- ----- --
bbsr truck 2
bus 4
car 5

The 2nd and third row cell[0] values remain blank...
i'm using gridview_rowdatabound event.
i want to compare current row.cell[0] value with prevoius row.cell[0] value.
If both values becomes same then the current row.cell[0] value remains blank...

Somebody Please help me...
i need the code in c#....
plz help me...
I'm in a very drastic situation...
Kindly help me...
Posted
Updated 16-Apr-12 0:46am
v3
Comments
Amrut Bishnu 16-Apr-12 6:16am    
somebody help me please....
Amrut Bishnu 16-Apr-12 6:16am    
I'm stuck in the middle of a project.
Amrut Bishnu 16-Apr-12 7:06am    
Is anybody there????

1 solution

Refer this
here comparision with next row is given
I think you can do necessary changes

http://stackoverflow.com/questions/4035856/how-to-get-previous-rows-specific-value-to-compare-with-next-row-value-in-a-gri[^]

Note : here the code is in vb.net. Have a look at it so that you can get some idea.
 
Share this answer
 
v2
Comments
sravani.v 16-Apr-12 6:07am    
My 5!

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