<asp:GridView ID="GridView1" runat="server" align="center" AllowPaging="true" AutoGenerateColumns="False" class="tab1" DataSourceID="SqlDataSource1" HorizontalAlign="Center" Width="100%">
Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowDataBound Dim sno As New Label Dim SrNo As Integer If e.Row.RowType = DataControlRowType.DataRow Then SrNo = (GridView1.PageIndex + 1) * 10 - 9 sno = e.Row.FindControl("Sno") sno.Text = e.Row.RowIndex + SrNo sno.DataBind() End If 'for Edit the PR Details to pass the PRNo and RevisionNo in the URL Dim Hyper1 As New HyperLink If e.Row.RowType = DataControlRowType.DataRow Then Hyper1 = e.Row.FindControl("hyperlink1") Dim PNo1 As Integer = e.Row.Cells(1).Text Dim RevNo1 As Integer = e.Row.Cells(3).Text Hyper1.NavigateUrl = "PR.aspx?PNo=" & e.Row.Cells(1).Text & "&RevNo=" & e.Row.Cells(3).Text & "&page=" & GridView1.PageIndex + 1 Hyper1.DataBind() End If End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)