Useful C# Classes and methods to IMPROVE your knowledge easily.
Sunday, September 27, 2009
Adding Row Number to GridView - ASP.NET
GridView is a control which is used in all applications, most of the time showing a Row number in the left side of each row is needed. after adding a gridview on your aspx page then you should add template column , do the following things.
As the picture shows , you should set "Container.DataItemIndex + 1" to Text property of Labelwithin a asp:TemplateField in Columns .