I am using a Telerik Radgrid ,I have a web form which loads the grid with data by querying against a stored procedure ,the grid is loaded with almost 10 fields but I want to store just the first field (example: UserId) in session and use it on the same page.
Can any one tell me what should I do to retrieve first field from the output(which is dataset)??
Below is my code:
Protected Sub RadViewAllGrid_NeedDataSource(ByVal source As Object, ByVal e As Telerik.WebControls.GridNeedDataSourceEventArgs) Handles RadViewAllGrid.NeedDataSource
RadViewAllGrid.DataSource = dataaccess.GetEnrollment
Public Function GetEnrollment() As DataTable
Dim dm As DataManager = Nothing
Dim ds As DataSet = Nothing
Dim params As List(Of DataParameter) = Nothing
Dim errMsg As String = String.Empty
dm = New DataManager(ConnectionString)
params = New List(Of DataParameter)
ds = dm.ExecuteQuery(DataProviderType.SqlClient, EnrollUtility.SP_CHECKUSERIDBYADMIN, ReturnType.DataSetType, CommandType.StoredProcedure, Nothing)
Catch ex As Exception
If Not dm Is Nothing Then dm.Dispose()