Microsoft Content Management Server - Adding ChannelItem to ChannelItemCollection

This is Interesting: Free IT Magazines  
Home > Archive > Microsoft Content Management Server > February 2005 > Adding ChannelItem to ChannelItemCollection





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Adding ChannelItem to ChannelItemCollection
Gonçalo Boléo

2005-02-24, 7:51 am

Is possible to add a ChannelItem to a ChannelItemCollection?

I wan't to pick up some items from one channel and some others from another
channel (not a complete union) and then use SortByStartDate on them.

thanks,
Gonçalo Boléo



Stefan [MSFT]

2005-02-24, 7:51 am

Hi Goncalo,

the only thing you could do is to combine two collections using the Union
method.
But you could copy the collection into an array (using CopyTo method) and
then add the other Channel Item to the array.

Cheers,
Stefan.

--
This posting is provided "AS IS" with no warranties, and confers no rights
Book: Building Websites Using MCMS: http://tinyurl.com/3lh8s
----------------------


"Gonçalo Boléo" <gboleo@netcabo.pt> wrote in message
news:e7Zf8BmGFHA.3072@tk2msftngp13.phx.gbl...
> Is possible to add a ChannelItem to a ChannelItemCollection?
>
> I wan't to pick up some items from one channel and some others from

another
> channel (not a complete union) and then use SortByStartDate on them.
>
> thanks,
> Gonçalo Boléo
>
>
>



Paul Devenney

2005-02-24, 7:51 am

I always use listcollections for this kind of work. Whenever I write
controls to handle channel Items I generally utilize the collection
iterface, rather than a specific type, then your code does not care if you
pass it a ChannelItemCollection or a List....


"Stefan [MSFT]" <stefang@online.microsoft.com> wrote in message
news:ez8IfwmGFHA.3912@TK2MSFTNGP10.phx.gbl...
> Hi Goncalo,
>
> the only thing you could do is to combine two collections using the Union
> method.
> But you could copy the collection into an array (using CopyTo method) and
> then add the other Channel Item to the array.
>
> Cheers,
> Stefan.
>
> --
> This posting is provided "AS IS" with no warranties, and confers no rights
> Book: Building Websites Using MCMS: http://tinyurl.com/3lh8s
> ----------------------
>
>
> "Gonçalo Boléo" <gboleo@netcabo.pt> wrote in message
> news:e7Zf8BmGFHA.3072@tk2msftngp13.phx.gbl...
> another
>
>



Gonçalo Boléo

2005-02-24, 7:51 am

thanks

"Paul Devenney" <spam@spamgohere.com> wrote in message
news:ezph1zmGFHA.3928@TK2MSFTNGP09.phx.gbl...
> I always use listcollections for this kind of work. Whenever I write
> controls to handle channel Items I generally utilize the collection
> iterface, rather than a specific type, then your code does not care if you
> pass it a ChannelItemCollection or a List....
>
>
> "Stefan [MSFT]" <stefang@online.microsoft.com> wrote in message
> news:ez8IfwmGFHA.3912@TK2MSFTNGP10.phx.gbl...
Union[vbcol=seagreen]
and[vbcol=seagreen]
rights[vbcol=seagreen]
>
>



Stefan [MSFT]

2005-02-24, 8:46 pm

Hi Paul,

that sounds interesteing!
Do you have a code sample? I never used this and don't have a clue where to
start!

Thanks,
Stefan.

--
This posting is provided "AS IS" with no warranties, and confers no rights
Book: Building Websites Using MCMS: http://tinyurl.com/3lh8s
----------------------


"Paul Devenney" <spam@spamgohere.com> wrote in message
news:ezph1zmGFHA.3928@TK2MSFTNGP09.phx.gbl...
> I always use listcollections for this kind of work. Whenever I write
> controls to handle channel Items I generally utilize the collection
> iterface, rather than a specific type, then your code does not care if you
> pass it a ChannelItemCollection or a List....
>
>
> "Stefan [MSFT]" <stefang@online.microsoft.com> wrote in message
> news:ez8IfwmGFHA.3912@TK2MSFTNGP10.phx.gbl...
Union[vbcol=seagreen]
and[vbcol=seagreen]
rights[vbcol=seagreen]
>
>



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com