Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Formatting Datasets (and a quick question on datagrids)

Reply
Thread Tools

Formatting Datasets (and a quick question on datagrids)

 
 
Mike Fellows
Guest
Posts: n/a
 
      03-03-2004
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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do Datasets manage to get deserialized as DataSets instead of a wsdl.exe-created proxy class? Francisco Garcia ASP .Net Web Services 3 04-13-2006 05:53 PM
How do Datasets manage to get deserialized as DataSets instead of a wsdl.exe-created proxy class? Francisco Garcia ASP .Net 2 04-13-2006 10:41 AM
How do Datasets manage to get deserialized as DataSets instead of a wsdl.exe-created proxy class? news.microsoft.com ASP .Net Web Services 0 04-12-2006 09:07 AM
How do Datasets manage to get deserialized as DataSets instead of a wsdl.exe-created proxy class? news.microsoft.com ASP .Net 0 04-12-2006 09:07 AM
Quick question re: DataSets John Sweet ASP .Net 2 04-19-2005 01:08 AM



Advertisments