Loading Sharepoint Web Services XML List into WPF DataGrid



I'm trying to populate my DataGrid with the returned list from a Sharepoint Web Services, all of the tutorials/guides I've found go about doing this with a XAML file.


This is the code I'm using to pull the XML,



private String GetListNode()
{
webService.Lists siteClient = new webService.Lists();
System.Net.NetworkCredential passCredentials = new System.Net.NetworkCredential("username", "password", "domain");
siteClient.Credentials = passCredentials;

XmlNode getNode = siteClient.GetListItems("Tasks", string.Empty, null, null, string.Empty, null, null);

return getNode.OuterXml;
}


This returns the pages XML, within this page I'd like to grab these Items,



ows_ID, ows_Client, ows_AssignedTo, ows_LinkTitle, ows_Status, ows_Priority, ows_DueDate


I'd like to make these items Columns for the DataGrid, then having the data populate. All help will be appreciated, thank you in advanced.


No comments:

Post a Comment