Formatting Datasets (and a quick question on datagrids)

M

Mike Fellows

i have a function (shown below) that accepts a web datagrid and populates it
with a dataset

when i display my datagrid it shows the date as 00/00/0000 00:00:00

i need to format the time from the end of the date

i cant do this in the designer as the webform i use with the datagrid on
uses many different functions so
i cant format it with the designer

code:


Function LeadReceivedNoMortgageSourced(ByVal Datagrid As
System.Web.UI.WebControls.DataGrid, ByVal Title As String

Dim conn As New System.Data.SqlClient.SqlConnection(SQLstrConn)
Dim sql As String = "LeadReceivedNotMortgageSourced"
Dim da As New System.Data.SqlClient.SqlDataAdapter(sql, conn)
Dim ds As DataSet = New DataSet()
da.Fill(ds)
ds.Tables(0).Columns.Item(0).ColumnName = "ID "
ds.Tables(0).Columns.Item(1).ColumnName = "Surname "
ds.Tables(0).Columns.Item(2).ColumnName = "Date Lead Received"
Datagrid.DataSource = ds.Tables(0)
Datagrid.DataBind()
Title = "Lead Recieved Not Mortgage Sourced"

End Function



also when i access a datagrid in a WINDOWS form i can do x =
me.datagrid1.item(0,0)
but how do i do this in a WEBFORM as the .item does not exist

anyhelp with the above would be greatly appreciated

Mike Fellows
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top