Tuesday, November 6, 2007

SharePointListItemViewer

ListItem is...
Represents an item or row in a list.

[Copy from SDK]
Use the Items property or one of the GetItems methods of the SPList class, or use the Items property or GetItemsInFolder method of the SPDocumentLibrary class to return an SPListItemCollection object that represents the collection of items in a list. Use an indexer to return a single item from the collection. For example, if the collection is assigned to a variable named myItems, use myItems[index] in C#, or myItems(index) in Visual Basic 2005, where index is either the index number of the item in the collection,the internal name, or the display name of a list field. For an indexer based on a name, Windows SharePoint Services first looks for the field by internal name and then by display name.
To assign values to a field in a list item using an indexer, the values must be represented in a format that is appropriate for each built-in field type.

For ListItem Programming...
you need to know internalName of ListItem
That's why I started to make this program.
As you can see, there's an order for fields looks for and I prefer to use internal name because since I got an error for using display name and I read an article for that must use internal name than display name but I don't know what exactly. Anyways, Korean version of SharePoint is totally different between both.


SPListItemViewer is...
simply, print out all SPFields to get Title, InternalName and Item Value and CAML Query can be typed for specific SPListItem.



To download this, Click
here!!!

To test this program, you must run it locally
and read below requirements.

※ Requirements for this Program
1. Windows 2003 Server R2 or with ServicePace 2 installed
2. Runs SharePoint Server locally



------ [Korean] ------
SPListItemViewer 는...
SPListItem 의 Fields 들을 볼 수 있는 프로그램입니다.
ListItem 프로그래밍할때, ListItem 의 값이나 InternalName 을 알고자 할때혹은 CAML Query 등을 테스트하고자 할때 사용합니다. 위 SDK 에서 Field 를 찾을때는, 첫째로 internal name 그리고 display name 을 찾는다고 합니다. 그런데 관련 주제로 검색을 하다보면, internal name 이 대세이더군요... 한글은 직빵 에러이고, 영문은 가끔? 났었던 것 같네요... ^^
영문판이라면 둘의 값이 비슷한데, 한글은 보다시피 알수가 없죠...(어떤 인코딩일지???) ㅠㅠ 어쨌든, 영문판이라 해도 서로간의 혼동을 피하기 위해 internal name으로 코딩하는게 좋을 것 같네요... (뭐 순서만 잘 안다면, indexer 에 숫자를 넣어도 됩니다. --;)
다운로드하려면, 여기를 눌러주세요!!!
코드는 나중에 시간나면, 설명해드릴께요~ (쉬워요~~.)

No comments: