Prev: WPF-style code
Next: Uploading file to UNIX host
From: Anthony on 13 Apr 2010 12:21 Is there a way to populate a DataSet via a LINQ query? (Linq to XML) Instead of; DataSet ds = new DataSet(); ds.ReadXml(myfile.xml, XmlReadMode.InferTypedSchema); dataGridView1.DataSource = ds.DefaultViewManager; dataGridView1.DataMember = "myNode"; Anthony
From: Mr. Arnold on 13 Apr 2010 12:39 Anthony wrote: > Is there a way to populate a DataSet via a LINQ query? > > (Linq to XML) > > Instead of; > DataSet ds = new DataSet(); > ds.ReadXml(myfile.xml, XmlReadMode.InferTypedSchema); > dataGridView1.DataSource = ds.DefaultViewManager; > dataGridView1.DataMember = "myNode"; > > > Anthony > > You use a Linq-2-XML query and just bind the Linq query results to the control. You can do that. You don't need a dataset.
From: Anthony on 13 Apr 2010 13:10 > You use a Linq-2-XML query and just bind the Linq query results to the > control. You can do that. You don't need a dataset. How can i bind the Linq query results to the control ? Anthony
From: Mr. Arnold on 13 Apr 2010 13:56 Anthony wrote: >> You use a Linq-2-XML query and just bind the Linq query results to the >> control. You can do that. You don't need a dataset. > > How can i bind the Linq query results to the control ? > It's in the link. http://blogs.techrepublic.com.com/programming-and-development/?p=594
From: Anthony on 16 Apr 2010 02:36
> It's in the link. > > http://blogs.techrepublic.com.com/programming-and-development/?p=594 I still have a problem. I've a windows form application and DataGridView does not contain a definition for 'DataBind' and no extension method 'DataBind'. Anthony |