0

I want to view and edit the properties of a Document using a windows form: Is this feasible?

To be more clear, when you click on "Edit Properties" for a document inside a Document Library in SharePoint, a webpage opens (Editform.aspx i think) that automatically renders all the fields of the content type of the document as well as all the values. The user can change those values and save. (different controls are automatically rendered, a listbox, a textbox, a combobox, a people picker etc...each column type has its component).

Is it possible to make the same thing but using my own "Windows Form" application? any ideas?

1 Answer 1

1

Definitely, you can use easily achieve this by using the SharePoint lists.asmx web service. If you have an idea of what fields your document library has as well as their types then you can query SharePoint via the getlistitems web method and pass in the required CAML query. Throught this you can both read and update the metadata of a specific item.

4
  • Thanks,but my question is more about rendering a page to edit those fields, for example suppose you are doing this from a windows application (not web page) and you want to edit a column of type "People editor" how would you draw a people editor control in order to edit it?
    – Zee99
    Aug 26, 2010 at 20:21
  • To the best of my knowledge it not possible to render those control automatically like on a win form. But again if you know the types of all the control you can use an InfoPath form to get this job done. InfoPath can provide you all most all the controls you need (including people picker) and can act a win app as well as can be published on web.
    – Vivek
    Aug 27, 2010 at 3:14
  • but the idea is to have a generic form that works dynamically on any content type
    – Zee99
    Aug 27, 2010 at 6:40
  • 1
    As Vivek says it's not really possible to render the controls automatically - e.g. rendering the people picker in a win form application. What you could do is in some code loop through the fields on the list and create an equivalent field programmatically in the winform app - probably just textboxes - then perhaps restrict what the user can enter (string, int) etc. Or have some validation on submit to ensure they have entered the correct data. That's the only other way I can think of...but you would be better off going the InfoPath form route I think.
    – Anonymous
    Aug 27, 2010 at 9:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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