Example of use

Oct 16, 2009 at 9:12 PM

Thanks so much. I am not used to programmatically working with the lists. How do I instantiate a new custom list item object in c#?

 Microsoft.SharePoint.SPListItem item; 
        SecPersonnel.PersonnelListItem pli = new SecPersonnel.PersonnelListItem();
Thanks!
Coordinator
Oct 26, 2009 at 3:11 PM
Sorry, I just got back from vacation and got your message - hence the delay.

Answer to your question:

Keep in mind that the classes SPDX generates are just wrappers around SPListItem. Therefore to create a new item using the framework, you need to create a new item on the list as if you were not using SPDX. Then instantiate a wrapper and pass a refernce to that SPListItem to its constructor. Now you have strongly typed access!

Hope this helps.

Ilya

On Fri, Oct 16, 2009 at 4:12 PM, beruken <notifications@codeplex.com> wrote:

From: beruken

Thanks so much. I am not used to programmatically working with the lists. How do I instantiate a new custom list item object in c#?

 Microsoft.SharePoint.SPListItem item; 
        SecPersonnel.PersonnelListItem pli = new SecPersonnel.PersonnelListItem();
Thanks!

Read the full discussion online.

To add a post to this discussion, reply to this email (spdx@discussions.codeplex.com)

To start a new discussion for this project, email spdx@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Coordinator
Nov 30, 2009 at 3:32 PM
Sorry, I just got back from vacation and got your message - hence the delay.

Answer to your question:

Keep in mind that the classes SPDX generates are just wrappers around SPListItem. Therefore to create a new item using the framework, you need to create a new item on the list as if you were not using SPDX. Then instantiate a wrapper and pass a refernce to that SPListItem to its constructor. Now you have strongly typed access!

Hope this helps.

Ilya

On Fri, Oct 16, 2009 at 4:12 PM, beruken <notifications@codeplex.com> wrote:

From: beruken

Thanks so much. I am not used to programmatically working with the lists. How do I instantiate a new custom list item object in c#?

 Microsoft.SharePoint.SPListItem item; 
        SecPersonnel.PersonnelListItem pli = new SecPersonnel.PersonnelListItem();
Thanks!

Read the full discussion online.

To add a post to this discussion, reply to this email (spdx@discussions.codeplex.com)

To start a new discussion for this project, email spdx@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com