I'm Retrieving datas into a DGView with a datareader object. In the process is it possible to automatically give Serial numbers for the records (starting from 1) to the first column of the DGV... ??
This is how I retrieve.
As per this Sql Statement the I column is DevoteeId and II column is DevoteeName. I want some kind of a alteration to this Sql statement by which i want to see "SlNo" as Col I, DevoteeID as col II and DevoteeName as Col III.
This is how I retrieve.
Code:
Dim vRs As SqlClient.SqlDataReader
Dim vSqlText As String
Dim Table As New DataTable
vSqlText = "Select DevoteeID, DevoteeName from B_Devotee order by DevoteeName"
vRs = CreateReader(vSqlText) '..... a public function
Table.Load(vRs)
Grid1.DataSource = Table