Hi keyaa,
1. I'm retrieving sharepoint list data in an application. These list items are shown in a DataGridView. I have a list which have links to attachments. How can I view that attachments through a link in the DataGridView.
Reply: I am not familiar with attachments in DataGridView, but I can provide some ideas. To show the value of large size on a DataGridView, we often add another form to show the data and handle the CellDoubleClick event of the DataGridView to show the form.
1) If the data is text, we can add a TextBox control and set its Multiline property to true onto the form. The Text property of TextBox contains the text.
Link: http://msdn.microsoft.com/en-us/library/system.windows.forms.textbox.aspx
2) If the data is a picture, we can add a PictureBox control onto the form to show the picture. The Image property contains the image.
Link:
http://msdn.microsoft.com/en-us/library/system.windows.forms.picturebox.aspx
3) If the data is a document of type RTF, we can add a RichTextBox control onto the form to show the document. The Rtf property contains the document.
Link:
http://msdn.microsoft.com/en-us/library/system.windows.forms.richtextbox.aspx
2. I'm using the GetListItems in an XmlNode. And then into a StringReader. I want only the columns that are in the List because the OuterXml and InnerXml gives you information which i don't want. How can i remove them?
Reply: Based on my understanding, you only need to load some of the nodes, the text or attributes of which are equal to some certain values. We can create a XPath string and take it as a parameter to call the SelectNodes method to ge the filted nodes. This is a walkthrough:
http://msdn.microsoft.com/en-us/library/d271ytdx(VS.80).aspx
This is the details about SelectedNodes method:
http://msdn.microsoft.com/en-us/library/hcebdtae.aspx
These are some documents about XPath:
http://msdn.microsoft.com/en-us/library/ms256115.aspx
http://msdn.microsoft.com/en-us/library/ms256086.aspx
Regards,
Aland Li
Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.