|
-
Nov 24th, 2005, 03:38 AM
#1
Thread Starter
Registered User
[RESOLVED] two fields in one datagrid column...
ok, so on form_load, i programatically added columns to the datagrid like so...
VB Code:
column = New DataGridTextBoxColumn
column.MappingName = "contact_given"
column.HeaderText = "Name"
column.Width = 150
tsContacts.GridColumnStyles.Add(column)
column = New DataGridTextBoxColumn
column.MappingName = "contact_surname"
column.HeaderText = "Name"
column.Width = 150
tsContacts.GridColumnStyles.Add(column)
my question is that, can i add to colums from my database(contact_given & contact_surname), to only one colum in my datagrid(Name)
Thanks, Justin
-
Nov 24th, 2005, 04:12 AM
#2
Re: two fields in one datagrid column...
No. You'd need to create another column in your data source and use its Expression property to create the combined values. Either that or use your query to create the combined column when you retrieve the data in the first place.
-
Nov 24th, 2005, 04:59 AM
#3
Thread Starter
Registered User
Re: [RESOLVED] two fields in one datagrid column...
Thank you for clearing that up for me
-
Jan 12th, 2008, 03:56 PM
#4
New Member
Re: two fields in one datagrid column...
Hi! I'm struggling with this one, could you show me some code? because you lost me with the Expression Property part. I'm working for the mobile platform.
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|