PC Review


Reply
Thread Tools Rate Thread

Calculated Column in a DataTable and padding a string

 
 
Sam
Guest
Posts: n/a
 
      20th Aug 2003
I have a calculated column called "Display" in a DataTable called
"MyTable".

The Display column is three columns concatenated onto each other.
They are iID, cTitle, dtCreationDate.

Is there a way to calculate the Display column so Creation date starts
at the same place, or in other words, to pad the Title column.

For example right now in my ListBox it shows:

1234 Title of 1234 08/20/03
4321 Long Title of 4321 08/20/03

and I would like it to look like:

1234 Title of 1234 08/20/03
4321 Long Title of 4321 08/20/03

The code I have to calculate the Display column is this:
m_dstPlans.Tables("Plans").Columns.Add("Display", GetType(String), _
"iID + ' ' + cTitle + ' ' + dtCreationDate")
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
unique string column on DataTable ? =?Utf-8?B?UmljaGFyZCBDaGFuZGxlcg==?= Microsoft ADO .NET 6 25th May 2007 05:24 AM
Update to calculated column in datatable Manish Microsoft VB .NET 0 14th Apr 2004 04:26 PM
Adding a Calculated column to a DataTable: How to handle w/ null values Sam Microsoft Dot NET Framework 1 8th Apr 2004 09:06 PM
calculated column in datatable using parent's columns Sankar Nemani Microsoft ADO .NET 0 15th Aug 2003 09:16 PM
Updating DataTable with calculated column Luca Giusti Microsoft ADO .NET 0 8th Jul 2003 04:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:43 PM.