check: If you can somehow set the column's visible property to false that should do it. If I could see your code might have a better idea at how to approach this. There are probably other mechanisms one could use for this.
I wouldn't want anything left not visible..I want to see it all I just want it to look like a report where the left most column is left aligned and the other 3 columns are right aligned within their column.
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
Select the data grid
click property builder
click format
expand Columns from the objects windows
expand which column you want to format
select Item
format item
Ok, I've now actually typed in my fields that my SP is returning...however, I need to change something because I'm returning 8 rows instead of the 4....so something in the code behind is doubling up this binding...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.