Hi,
change the gridview source as below.
<columns>
<asp:templatefield headertext="Pointer No" xmlns:asp="#unknown">
<itemtemplate>
<asp:label text='<%#Eval("PointerNo")%>' id="lblPointerNo" runat="server">
</asp:label>
</itemtemplate>
</asp:templatefield>
</columns>
bind the gidview as below.
Sub BindGridview(ByVal rownum As Integer)
Dim dt as New DataTable
dt.Columns.Add("PointerNo", Type.GetType(string))
dt.AcceptChanges()
For i As Integer = 0 To rownum - 1
dt.Rows.Add((i + 1).ToString())
dt.AcceptChanges()
Next
grdvw1.DataSource = dt
grdvw1.DataBind()
End sub
option Two
keep the grid view source unchanged. add the below code in RowDataBoundEvent.
Dim lbl as Label = CType(e.Row.FindControl("lblPointerNo"), Label)
If lbl IsNot Nothing THEN
IF e.Row.RowIndex < Convert.ToInt32(ddlst_Scale_pointers.SelectedValue) THEN
lbl.Text = (e.Row.RowIndex + 1).ToString();
End If
End If
hope it helps