Code :
if (e.Item is GridDataItem)
{
int strIndex = radgridshowRRstatus.MasterTableView.CurrentPageIndex;
Label lbl = e.Item.FindControl("lblSn") as Label;
lbl.Text = Convert.ToString((strIndex * radgridshowRRstatus.PageCount) + e.Item.ItemIndex + 1);
}
<telerik:GridTemplateColumn HeaderText="Sr.No" UniqueName="SrNo">
<ItemTemplate>
<asp:Label ID="lblSn" runat="server" />
</ItemTemplate>
</telerik:GridTemplateColumn>
Done :)
if (e.Item is GridDataItem)
{
int strIndex = radgridshowRRstatus.MasterTableView.CurrentPageIndex;
Label lbl = e.Item.FindControl("lblSn") as Label;
lbl.Text = Convert.ToString((strIndex * radgridshowRRstatus.PageCount) + e.Item.ItemIndex + 1);
}
<telerik:GridTemplateColumn HeaderText="Sr.No" UniqueName="SrNo">
<ItemTemplate>
<asp:Label ID="lblSn" runat="server" />
</ItemTemplate>
</telerik:GridTemplateColumn>
Done :)
Comments
Post a Comment