c# add datagrid column for computed POOM appointment value

N

None

hi there,

i have a datagrid whose datasource is outlook.appointmenets.items. it
can display the appointmenet items as expected. however, i want the
datagrid to show an additional column (col3) displaying a computed
value. below is an example.

col1 col2 col3
start time1 end time1 subject1 + location1
start time2 end time2 subject2 + location2

can anybody tell me how to add col3 to the datagrid and make it show
(subject + location)?
i use c# and .net compact framework 2.0, thanks.

batterheadccw
 
I

Ilya Tumanov [MS]

Override cell painting (supported starting NETCF V2 SP1) and draw whatever
you need in the cell.



See this for a sample
http://blogs.msdn.com/netcfteam/archive/2006/04/25/583542.aspx.


--
Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).
 
N

None

thanks Ilya,
however the col3 is an "additional" column which is not in the
outlook.appointmenets.items collection. NETCF will not accept
DataGridTextBoxColumn.MappingName = "col3". is there any way to
insert / add a new column for col3?

thanks
batterheadccw
 
I

Ilya Tumanov [MS]

You can't add columns without modifying underlying type which represents a
row.

But you can paint whatever you want in any existing column.

Say, you probably don't need "subject" and/or "location" columns, so display
"subject + location" in one of them.


--
Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).
 
N

None

thanks llya,

i have been trying exactly what you said. i calculate "subject +
location" and put the result back to column location and it look good.

batterheadccw
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top