Click here to Skip to main content
15,909,530 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Friends,
i have a Gridview in which there is particular Column name SrNo
my requirement is the SrNo should automacillay gets its series no
example for 1st row in gridview it should be P01
for second it will be P02 and so on.....
the users will manually enter the other details in Grid except SrNo.

how can i acheive this?

Regards,
aamir
Posted
Comments
bittu_76 5-Jul-12 6:02am    
How can i bind gridview in asp.net project

hey lets try this code

try it[^]
may be help you

thank you
ChetanV
 
Share this answer
 
Comments
aamir07 5-Jul-12 4:23am    
Dear Chetan,
thanks for Ur Post,
but can i get the Value in following Format P01,P02,P03....so on
try this

C#
<asp:templatefield>  
<itemtemplate>      
<asp:label id="hdrStatus" visible="true" runat="server" text=" <%#"P0"+Container.DataItemIndex+1 %>">
</asp:label>    
</itemtemplate> 
</asp:templatefield>


add this may be you get
what you want.
let me know this will solve your problem or not
Thank you
ChetanV
 
Share this answer
 
v2
Comments
bbirajdar 5-Jul-12 5:11am    
Please use 'Improve Solution' button instead of posting a new solution...

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