Dim ds As DataSet = ocon.FillSPDataSet(myproc, param)
Dim col As New DataColumn
col.ColumnName = "SrNo"
col.Caption = "Srno"
ds.Tables(0).Columns.Add(col)
For i = 0 To ds.Tables(0).Rows.Count - 1
ds.Tables(0).Rows(i)("SrNo") = 1 + 1
Next
If Not ds.Tables(0).Rows.Count = 0 Then
GridView1.DataSource = ds
GridView1.DataBind()
End If
<asp:gridview id="GridView1" runat="server" cellpadding="2" forecolor="#333333" gridlines="None"
="" autogeneratecolumns="False" autogeneratedeletebutton="false" horizontalalign="Center" cssclass="border">
<footerstyle backcolor="#5D7B9D" font-bold="True" forecolor="White">
<columns>
<asp:templatefield headertext=" Sr.No" sortexpression=" ID" visible="False">
<itemtemplate>
<asp:label id="lblid" runat="server" text="<%# Eval("SrNo") %>">
<asp:templatefield headertext="Registration Number" sortexpression="Inst_Name">
<itemtemplate>
<asp:label id="lblInstName" runat="server" text="<%# Eval("Registration_Number") %>">
<asp:templatefield headertext="Roll No" sortexpression="ADMISSION YEAR">
<itemtemplate>
<asp:label id="lblAyear" runat="server" text="<%# Eval("RollNo") %>">
<asp:templatefield headertext="Name" sortexpression="COURSE">
<itemtemplate>
<asp:label id="lblcourse" runat="server" text="<%# Eval("Candidate_1stName") %>">
<asp:templatefield headertext="Father Name" sortexpression="BRANCH">
<itemtemplate>
<asp:label id="lblbranch" runat="server" text="<%# Eval("Father_Name") %>">
<asp:templatefield headertext="DateofBirth" sortexpression="NAME">
<itemtemplate>
<asp:label id="lblname" runat="server" text="<%# Eval("DateofBirth") %>">
<asp:templatefield headertext="Diploma %" sortexpression="SEX">
<itemtemplate>
<asp:label id="lblSex" runat="server" text="<%# Eval("Acadamic_Diploma_Percentage") %>">
<rowstyle backcolor="#F7F6F3" forecolor="#333333">
<editrowstyle backcolor="#999999">
<selectedrowstyle backcolor="#E2DED6" font-bold="True" forecolor="#333333">
<pagerstyle backcolor="#284775" forecolor="White" horizontalalign="Center">
<headerstyle backcolor="#5D7B9D" font-bold="True" forecolor="White">
<alternatingrowstyle backcolor="White" forecolor="#284775">