Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#4.0
How to Auto Generate Serial No in List View in C#.Net
Posted 11-Feb-13 1:45am
Comments
Maciej Los at 11-Feb-13 7:56am
   
Please, be more specific and provide more details, examples!!! What you mean serial number?
OriginalGriff at 11-Feb-13 7:57am
   
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
Use the "Improve question" widget to edit your question and provide better information.
aspnet_regiis -i at 11-Feb-13 8:21am
   
Mr. Chennai..Is this Winforms or ASP.NET question?

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

The solution is to add
<%# Container.DataItemIndex + 1 %>
to the ItemTemplate of the ListView
  Permalink  
v2
Comments
Maciej Los at 11-Feb-13 8:17am
   
This is ASP.NET code. Do you see "ASP.NET" tag?
aspnet_regiis -i at 11-Feb-13 8:21am
   
Oh right.. Let me check this with OP before deleting my solution
Maciej Los at 11-Feb-13 8:25am
   
Decision belongs to you ;) but i suggest to delete this solution to avoid down-voting.

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

  Print Answers RSS
0 OriginalGriff 383
1 Richard Deeming 180
2 ChauhanAjay 176
3 Sergey Alexandrovich Kryukov 171
4 Yogesh Kumar Tyagi 165
0 Sergey Alexandrovich Kryukov 6,252
1 OriginalGriff 5,498
2 CPallini 2,473
3 Richard MacCutchan 1,627
4 Abhinav S 1,530


Advertise | Privacy | Mobile
Web04 | 2.8.140821.2 | Last Updated 11 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100