Click here to Skip to main content
12,881,367 members (29,986 online)
Rate this:
 
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 23-May-11 1:35am
   
yeah S Mewara... i tried and looked there.. it worked.. thanks alot.
S Mewara 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 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  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

<telerik:gridtemplatecolumn allowfiltering="false" headerstyle-width="30px" headertext="S.L.No" xmlns:telerik="#unknown">
<itemtemplate>

<%# Container.DataSetIndex+1 %>












Regards:

Vijayendrean Karthikeyan
  Permalink  

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

    Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.170422.1 | Last Updated 12 Jun 2014
Copyright © CodeProject, 1999-2017
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