I want to load fields of the default view for Sharepoint list
through client object model (I am using Silverlight). Here are some relevant things I've found (on msdn here):
- class
List
has propertyDefaultViewUrl
[of typestring
] - class
List
has methodGetView(Guid)
- class
List
has propertyViews
[of typeViewCollection
] - class
ViewCollection
has methodGetById(Guid)
- class
ViewCollection
has methodGetByTitle(string)
- class
View
has propertyDefaultView
[of typebool
]
That's everything I was able to find. As you can see there is no direct way of getting DefaultView (there is missing DefaultViewId
property on List
or GetByUrl(string)
method on ViewCollection
).
Seems to me as the only solution is to iterate through List.Views
collection and check DefaultView
property on each View
. Which is kind of...well, inefficient...
Did I miss something? Anyone see some straigh solition? Thanks for ideas.