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
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