473,513 Members | 13,099 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Calculated Columns in a Datagrid

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?
Nov 20 '05 #1
1 1296
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...tingexpression
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==?=" <an*******@discussions.microsoft.com>
| Subject: Calculated Columns in a Datagrid
| Date: Tue, 24 Feb 2004 14:16:06 -0800
| Lines: 1
| Message-ID: <C6**********************************@microsoft.co m>
| 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?
|

Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
19526
by: Dan Keeley | last post by:
Hi, I have a dataset which is used to populate my datagrid something like this: My question is, how do I add a caluclated display column to the datagrid? It will be based on ScoreCardScore... ...
1
1916
by: Manish | last post by:
Hello Everyone I am having weird problem in my datagrid bounded to datatable. My datatable is populated from SQLServer database. DataGrid has Calculated column Week% and Calculated record, SPLH....
2
6000
by: Unforgiven | last post by:
Hello All, I have the following query... SELECT Demographics.Full_Name, Demographics.Year_of_birth, Status.Status_OK, SUM(2004 - Demographics.Year_of_birth) AS Age FROM Demographics INNER...
0
1071
by: samir | last post by:
hi i have a datagrid where i display some columns. i want to have some columns from the db and 2 i calculate,i can display it but problem is how to sort the calculated columns. here is what i am...
0
7153
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7373
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7432
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7094
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7519
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5677
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3218
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
452
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.