From: Anthony on
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
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
> 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
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
> 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


 |  Next  |  Last
Pages: 1 2 3
Prev: WPF-style code
Next: Uploading file to UNIX host