Here's my code:
Sub bindGrid()
dgBU.DataSource = CreateDataSource("total"

dgBU.DataBind()
dgBU.Dispose()
End Sub
Function CreateDataSource(ByVal grid) As ICollection
Dim dv As DataView
Dim objConn As SqlConnection = New SqlConnection()
objConn.ConnectionString = ConfigurationSettings.AppSettings("ConnectionString"
Dim dt As DataTable
Dim dr As DataRow
Dim i As Integer
Dim strsql As String
Dim dsResults As New DataSet()
'create a DataTable
' If the command string is empty
dt = New DataTable()
strsql = "VKFORMS_SPCreditMGTARBusinessUnit '" & ddlSort.SelectedItem.Value & "'"
objConn.Open()
Dim da As SqlDataAdapter = New SqlDataAdapter(strsql, objConn)
da.Fill(dsResults)
dt = dsResults.Tables(0)
dv = New DataView(dt)
da.Dispose()
objConn.Close()
'return a DataView to the DataTable
CreateDataSource = dv
End Function
It returns 4 fields
Business Unit - total - over 90 - over 120
I want business unit to be left aligned and the other 3 to be right aligned....also, is there a way to put a total row at the bottom...???
thanks,
dlc