Hello-
Add a column to your DataTable and set its Expression property. Check out
this topic:
Creating Expression Columns (.NET Framework Developer's Guide)
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconcreatingexpression
columns.asp
Hope this helps,
Steve Stein
VB Team
--
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| Thread-Topic: Calculated Columns in a Datagrid
| thread-index: AcP7I8x/XpIm1JliSYOGKuOBo35KNQ==
| X-Tomcat-NG: microsoft.public.dotnet.languages.vb
| From: "=?Utf-8?B?U2Vhbg==?=" <
[email protected]>
| Subject: Calculated Columns in a Datagrid
| Date: Tue, 24 Feb 2004 14:16:06 -0800
| Lines: 1
| Message-ID: <
[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.languages.vb
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:184481
| NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
| X-Tomcat-NG: microsoft.public.dotnet.languages.vb
|
| I have a table I am using to load a DataSet.DataTable to display data on
a DataGrid. I have a Column called StartTime that is a DateTime and I have
a column called Duration that is an Int32, that contains minutes. I want to
create a calculated column that adds the minutes to the StartTime and is
called EndTime. Any thought on how to go about doing this?
|