Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Telerik
Hi Every,
I am so lucky to be a member of Code project.Thanks guys for all the support.
 
Today i am stuck with a problem in telerik rad grid view. Can any body has idea how to show auto serial number in my rad grid view.
 
thanks in advance.
Posted 20-May-11 18:56pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Did you tried looking here:
Telerik RadGrid Forum[^]
Posting here is fine. Might be someone can help but I had found that specific questions related to 3rd party is answered more quickly and accurately at respective forums.
 
Based on what you ask, there is a high chance that it might be already documented there or someone must have asked it.
  Permalink  
Comments
Saumya J Pandey at 23-May-11 1:35am
   
yeah S Mewara... i tried and looked there.. it worked.. thanks alot.
S Mewara at 23-May-11 2:36am
   
:thumbsup:
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Hi you can this:
 
 protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
        {
            if (e.Item is GridDataItem)
            {
                GridDataItem dataItem = (GridDataItem)e.Item;
                dataItem["RowNumber"].Text = Convert.ToString(grdState.PageSize * grdState.CurrentPageIndex + e.Item.ItemIndex + 1);
 
            }
        }
 
<columns>
    <telerik:gridboundcolumn uniquename="RowNumber" xmlns:telerik="#unknown"></telerik:gridboundcolumn></columns>
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3




<%# Container.DataSetIndex+1 %>



 

 

 

 

 
Regards:
 
Vijayendrean Karthikeyan
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

As vkeyan has posted, Add a column to Radgrid as
 
<telerik:GridTemplateColumn HeaderText="#" UniqueName="RowNumber">
                        <ItemTemplate>
                            <asp:Label runat="server" ID="lblRowNumber" Width="50px" Text='<%# Container.DataSetIndex+1 %>'></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 370
1 Prakriti Goyal 177
2 Sergey Alexandrovich Kryukov 155
3 jlopez788 134
4 _Amy 110
0 OriginalGriff 6,762
1 Sergey Alexandrovich Kryukov 5,539
2 Maciej Los 3,479
3 Peter Leow 3,323
4 DamithSL 2,505


Advertise | Privacy | Mobile
Web03 | 2.8.140721.1 | Last Updated 12 Jun 2014
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