Protected Sub grdCollateral_NeedDataSource(ByVal source As Object, ByVal e As GridNeedDataSourceEventArgs)
Dim objConn1 As SqlConnection
objConn1 = New SqlConnection(System.Configuration.ConfigurationManager.AppSettings("ConnPortal"))
Dim oCom1 As SqlCommand
oCom1 = New SqlCommand
oCom1.Connection = objConn1
oCom1.CommandText = "sp_cfa_TestCollateral"
oCom1.CommandType = CommandType.StoredProcedure
Dim dA As SqlDataAdapter = New SqlDataAdapter(oCom1)
Dim myDataTable As DataTable = New DataTable()
objConn1.Open()
Try
dA.Fill(myDataTable)
Finally
objConn1.Close()
End Try
grdCollateral.DataSource = myDataTable.DefaultView
grdCollateral.GroupingSettings.CaseSensitive = False
objConn1.Dispose()
oCom1.Dispose()
oCom1 = Nothing
End Sub
ASKER
The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.
TRUSTED BY
here is ther code
public static IList<T> ConvertTo<T>(DataTable table)
{
if (table == null)
return null;
List<DataRow> rows = new List<DataRow>();
foreach (DataRow row in table.Rows)
rows.Add(row);
return ConvertTo<T>(rows);
}