By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,501 Members | 1,660 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,501 IT Pros & Developers. It's quick & easy.

Formatting Datasets (and a quick question on datagrids)

P: n/a
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
Nov 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.