Paul,
Create a typed dataset with a table structured as the rows you are getting from the API. The VS will create a source code file with types, properties and methods facilitating access to the dataset. You can use this automatically created code to fill up the dataset. Then bind the dataset to the datagrid.
Eliyahu
"Paul D. Fox" <> wrote in message news:...
I have some sample code that queries through a products API. I'd like to convert this sample into a Datasource that I can bind to a Datagrid (instead of using the Console.WriteLine), but not sure as to how. Can anyone help? Here's the sample:
For i = 0 To queryResults.GetRowCount - 1
Dim document As IObjectQueryRow = queryResults.GetRow(i)
'Print out standard properties
Console.WriteLine("Document: " + document.GetName())
Console.WriteLine("Created: " + document.GetCreated())
Console.WriteLine("Last Modified: " + document.GetLastModified())
Console.WriteLine("Description: " + document.GetDescription())
Console.WriteLine("Description: " + document.
'Print out a Document-specific property
Console.WriteLine("Located at URL:" + document.GetStringValue(DocumentProperty.URL))
Next
Paul
|