3

I created and deployed link list (default template (103)) from code and after that I added ListViewWebPart also from code which looks on default view of my link list. And that works.

Problem: How can i customize list from code so when i "load" that list in web part i get only reduced set of columns? For example (i want only "URL" column and not "Notes","Edit","Type" etc.. which i get default with "link list")

I assume that i should create new view on list(but I don't know how i can create view and stick it on list - from code) and than load that new reduced view in webpart OR somehow customize default view on web part. It's simple from designer, but any help how do that from code will be greatly appreciated.

3

Have a look at this post on MSDN which involves programmatically creating list views: http://blogs.msdn.com/b/sowmyancs/archive/2008/03/15/programmatically-create-a-view-custom-view-of-a-list-and-change-the-view.aspx

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.